mirror of https://github.com/zulip/zulip.git
upload: Use get_export_tarball_url in upload_export_tarball.
This commit is contained in:
parent
4cf835d9dd
commit
1a7b3ef7ed
|
@ -241,8 +241,7 @@ class LocalUploadBackend(ZulipUploadBackend):
|
|||
abs_path = os.path.join(assert_is_not_none(settings.LOCAL_AVATARS_DIR), path)
|
||||
os.makedirs(os.path.dirname(abs_path), exist_ok=True)
|
||||
shutil.copy(tarball_path, abs_path)
|
||||
public_url = realm.url + "/user_avatars/" + path
|
||||
return public_url
|
||||
return self.get_export_tarball_url(realm, "/user_avatars/" + path)
|
||||
|
||||
@override
|
||||
def delete_export_tarball(self, export_path: str) -> str | None:
|
||||
|
|
|
@ -445,8 +445,7 @@ class S3UploadBackend(ZulipUploadBackend):
|
|||
else:
|
||||
key.upload_file(Filename=tarball_path, Callback=percent_callback)
|
||||
|
||||
public_url = self.get_public_upload_url(key.key)
|
||||
return public_url
|
||||
return self.get_export_tarball_url(realm, key.key)
|
||||
|
||||
@override
|
||||
def delete_export_tarball(self, export_path: str) -> str | None:
|
||||
|
|
Loading…
Reference in New Issue