mirror of https://github.com/zulip/zulip.git
import: Fix importing slack avatars into S3_UPLOAD_BACKEND.
Apparently, a subtle mismatch between the filename/URL formats for our upload codebases meant that importing Slack avatars into systems using S3_UPLOAD_BACKEND would end up with the avatars having the wrong URLs.
This commit is contained in:
parent
bf14a0af4d
commit
02d55928ea
|
@ -616,6 +616,11 @@ def import_uploads(import_dir: Path, processes: int, processing_avatars: bool=Fa
|
||||||
if record['s3_path'].endswith('.original'):
|
if record['s3_path'].endswith('.original'):
|
||||||
relative_path += '.original'
|
relative_path += '.original'
|
||||||
else:
|
else:
|
||||||
|
# TODO: This really should be unconditional. However,
|
||||||
|
# until we fix the S3 upload backend to use the .png
|
||||||
|
# path suffix for its normal avatar URLs, we need to
|
||||||
|
# only do this for the LOCAL_UPLOADS_DIR backend.
|
||||||
|
if not s3_uploads:
|
||||||
relative_path += '.png'
|
relative_path += '.png'
|
||||||
elif processing_emojis:
|
elif processing_emojis:
|
||||||
# For emojis we follow the function 'upload_emoji_image'
|
# For emojis we follow the function 'upload_emoji_image'
|
||||||
|
|
Loading…
Reference in New Issue