mirror of https://github.com/zulip/zulip.git
zthumbor: Fix thumbor behaviour when using it with s3 storage.
This commit is contained in:
parent
8324e2c976
commit
436bcd121b
|
@ -35,6 +35,11 @@ def load(context, url, callback):
|
|||
return
|
||||
|
||||
if source_type == THUMBOR_S3_TYPE:
|
||||
if actual_url.startswith('/user_uploads/'): # type: ignore # python 2 type differs from python 3 type
|
||||
actual_url = actual_url[len('/user_uploads/'):]
|
||||
else:
|
||||
raise AssertionError("Unexpected s3 file.")
|
||||
|
||||
s3_loader.load(context, actual_url, callback)
|
||||
elif source_type == THUMBOR_LOCAL_FILE_TYPE:
|
||||
if actual_url.startswith('/user_uploads/'): # type: ignore # python 2 type differs from python 3 type
|
||||
|
|
Loading…
Reference in New Issue