Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upload: Drop unused parameters to upload_message_attachment.

Alex Vandiver58a9fe9af1eb
diff --git a/zerver/lib/upload/__init__.py b/zerver/lib/upload/__init__.py
index a0ecccbdb01..f9bd7c53b30 100644
--- a/zerver/lib/upload/__init__.py
+++ b/zerver/lib/upload/__init__.py
@@ -137,11 +137,9 @@ def upload_message_attachment(
)
upload_backend.upload_message_attachment(
path_id,
- uploaded_file_size,
content_type,
file_data,
user_profile,
- target_realm,
)
create_attachment(
uploaded_file_name,
diff --git a/zerver/lib/upload/base.py b/zerver/lib/upload/base.py
index b0b42a87953..a6b4e4c0855 100644
--- a/zerver/lib/upload/base.py
+++ b/zerver/lib/upload/base.py
@@ -37,11 +37,9 @@ class ZulipUploadBackend:
def upload_message_attachment(
self,
path_id: str,
- uploaded_file_size: int,
content_type: str,
file_data: bytes,
user_profile: UserProfile,
- target_realm: Realm,
) -> None:
raise NotImplementedError
diff --git a/zerver/lib/upload/local.py b/zerver/lib/upload/local.py
index 028ffbe29b8..114c93e2d75 100644
--- a/zerver/lib/upload/local.py
+++ b/zerver/lib/upload/local.py
@@ -80,11 +80,9 @@ class LocalUploadBackend(ZulipUploadBackend):
def upload_message_attachment(
self,
path_id: str,
- uploaded_file_size: int,
content_type: str,
file_data: bytes,
user_profile: UserProfile,
- target_realm: Realm,
) -> None:
write_local_file("files", path_id, file_data)
diff --git a/zerver/lib/upload/s3.py b/zerver/lib/upload/s3.py
index e1986d4ccf7..0cb1477eb59 100644
--- a/zerver/lib/upload/s3.py
+++ b/zerver/lib/upload/s3.py
@@ -211,11 +211,9 @@ class S3UploadBackend(ZulipUploadBackend):
def upload_message_attachment(
self,
path_id: str,
- uploaded_file_size: int,
content_type: str,
file_data: bytes,
user_profile: UserProfile,
- target_realm: Realm,
) -> None:
upload_image_to_s3(
self.uploads_bucket,