upload: Pass down content-type of realm icon/logo to backend.

This saves having to try to re-derive it from the file extension,
which may be ".original" in some cases.
This commit is contained in:
Alex Vandiver
2024-07-10 20:54:47 +00:00
committed by Tim Abbott
parent b050c644e3
commit ff90e5355f
8 changed files with 36 additions and 23 deletions

View File

@@ -90,14 +90,16 @@ class ZulipUploadBackend:
def get_realm_icon_url(self, realm_id: int, version: int) -> str:
raise NotImplementedError
def upload_realm_icon_image(self, icon_file: IO[bytes], user_profile: UserProfile) -> None:
def upload_realm_icon_image(
self, icon_file: IO[bytes], user_profile: UserProfile, content_type: str
) -> None:
raise NotImplementedError
def get_realm_logo_url(self, realm_id: int, version: int, night: bool) -> str:
raise NotImplementedError
def upload_realm_logo_image(
self, logo_file: IO[bytes], user_profile: UserProfile, night: bool
self, logo_file: IO[bytes], user_profile: UserProfile, night: bool, content_type: str
) -> None:
raise NotImplementedError