mirror of https://github.com/zulip/zulip.git
migrations: Fix 0149_realm_emoji migration for S3 case.
The original migration implementation didn't follow the S3 API correctly.
This commit is contained in:
parent
886e77e858
commit
f7c563dfcc
|
@ -55,11 +55,11 @@ class S3Uploader(Uploader):
|
|||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
conn = S3Connection(settings.S3_KEY, settings.S3_SECRET_KEY)
|
||||
bucket_name = settings.S3_AVATAR_BUCKET
|
||||
self.bucket = conn.get_bucket(bucket_name, validate=False)
|
||||
self.bucket_name = settings.S3_AVATAR_BUCKET
|
||||
self.bucket = conn.get_bucket(self.bucket_name, validate=False)
|
||||
|
||||
def copy_files(self, src_key: str, dst_key: str) -> None:
|
||||
self.bucket.copy_key(src_key, self.bucket, dst_key)
|
||||
self.bucket.copy_key(dst_key, self.bucket_name, src_key)
|
||||
|
||||
def get_uploader() -> Uploader:
|
||||
if settings.LOCAL_UPLOADS_DIR is None:
|
||||
|
|
Loading…
Reference in New Issue