Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
upload: Rename backend to store_single_avatar_image.
Alex Vandiver4db136f841cc
diff --git a/zerver/lib/upload/__init__.py b/zerver/lib/upload/__init__.pyindex d8c808df078..2aaed4f3c0d 100644--- a/zerver/lib/upload/__init__.py+++ b/zerver/lib/upload/__init__.py@@ -346,7 +346,7 @@ def write_avatar_images() -> None:if backend is None:backend = upload_backend- backend.upload_single_avatar_image(+ backend.store_single_avatar_image(file_path + ".original",user_profile=user_profile,image_data=image_data,@@ -354,7 +354,7 @@ def write_avatar_images(future=future,)- backend.upload_single_avatar_image(+ backend.store_single_avatar_image(backend.get_avatar_path(file_path, medium=False),user_profile=user_profile,image_data=resize_avatar(image_data),@@ -362,7 +362,7 @@ def write_avatar_images(future=future,)- backend.upload_single_avatar_image(+ backend.store_single_avatar_image(backend.get_avatar_path(file_path, medium=True),user_profile=user_profile,image_data=resize_avatar(image_data, MEDIUM_AVATAR_SIZE),@@ -383,7 +383,7 @@ def write_jdenticon_avatars(if backend is None:backend = upload_backend- backend.upload_single_avatar_image(+ backend.store_single_avatar_image(backend.get_avatar_path(file_path, medium=False),user_profile=user_profile,image_data=image_data,@@ -391,7 +391,7 @@ def write_jdenticon_avatars(future=future,)- backend.upload_single_avatar_image(+ backend.store_single_avatar_image(backend.get_avatar_path(file_path, medium=True),user_profile=user_profile,image_data=image_data_medium,@@ -456,7 +456,7 @@ def ensure_avatar_image(user_profile: UserProfile, medium: bool = False) -> Noneresized_avatar = resize_avatar(image_data, MEDIUM_AVATAR_SIZE)else:resized_avatar = resize_avatar(image_data)- upload_backend.upload_single_avatar_image(+ upload_backend.store_single_avatar_image(final_file_path,user_profile=user_profile,image_data=resized_avatar,diff --git a/zerver/lib/upload/base.py b/zerver/lib/upload/base.pyindex 7700192bb5d..89e78039abc 100644--- a/zerver/lib/upload/base.py+++ b/zerver/lib/upload/base.py@@ -92,7 +92,7 @@ class ZulipUploadBackend:else:return f"{hash_key}.png"- def upload_single_avatar_image(+ def store_single_avatar_image(self,file_path: str,*,diff --git a/zerver/lib/upload/local.py b/zerver/lib/upload/local.pyindex 1ff4c1c80f5..4456a182e22 100644--- a/zerver/lib/upload/local.py+++ b/zerver/lib/upload/local.py@@ -159,7 +159,7 @@ class LocalUploadBackend(ZulipUploadBackend):return image_data, content_type or "application/octet-stream"@override- def upload_single_avatar_image(+ def store_single_avatar_image(self,file_path: str,*,diff --git a/zerver/lib/upload/s3.py b/zerver/lib/upload/s3.pyindex 520355abc4b..ab1da2069b6 100644--- a/zerver/lib/upload/s3.py+++ b/zerver/lib/upload/s3.py@@ -369,7 +369,7 @@ class S3UploadBackend(ZulipUploadBackend):return image_data, content_type@override- def upload_single_avatar_image(+ def store_single_avatar_image(self,file_path: str,*,