mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2026-04-26 22:12:28 +02:00
fix: typos & path
This commit is contained in:
@@ -222,7 +222,7 @@ class ParsedReplay(db.Model):
|
|||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
d = dict()
|
d = dict()
|
||||||
d.update({ "login" : self.login })
|
d.update({ "login" : self.login })
|
||||||
d.update({ "filepath" : self.login })
|
d.update({ "filehash" : self.login })
|
||||||
d.update({ "race_time" : self.get_human_readable_time() })
|
d.update({ "race_time" : self.get_human_readable_time() })
|
||||||
d.update({ "filepath" : self.filepath })
|
d.update({ "filepath" : self.filepath })
|
||||||
d.update({ "upload_dt" : self.upload_dt })
|
d.update({ "upload_dt" : self.upload_dt })
|
||||||
@@ -514,7 +514,7 @@ def get_s3_client():
|
|||||||
|
|
||||||
def upload_to_s3(local_path, replay):
|
def upload_to_s3(local_path, replay):
|
||||||
s3 = get_s3_client()
|
s3 = get_s3_client()
|
||||||
key = f"{replay.uploader}/{replay.filehash}/{os.path.basename(local_path)}"
|
key = f"{replay.filehash}"
|
||||||
s3.upload_file(local_path, S3_BUCKET, key)
|
s3.upload_file(local_path, S3_BUCKET, key)
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user