register api: Rename max_logo_file_size.

Renaming `max_logo_file_size` to `max_logo_file_size_mib`
reflecting the file size in mebibyte and update the frontend.
This commit is contained in:
Gaurav Pandey
2021-05-25 22:19:36 +05:30
committed by Tim Abbott
parent 531cf041f1
commit 1da818f848
4 changed files with 7 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ export function build_realm_logo_widget(upload_function, is_night) {
file_input_error_elem.expectOne(),
upload_button_elem.expectOne(),
upload_function,
page_params.max_logo_file_size,
page_params.max_logo_file_size_mib,
);
}

View File

@@ -81,7 +81,7 @@ def add_realm_logo_fields(state: Dict[str, Any], realm: Realm) -> None:
state["realm_logo_source"] = get_realm_logo_source(realm, night=False)
state["realm_night_logo_url"] = get_realm_logo_url(realm, night=True)
state["realm_night_logo_source"] = get_realm_logo_source(realm, night=True)
state["max_logo_file_size"] = settings.MAX_LOGO_FILE_SIZE
state["max_logo_file_size_mib"] = settings.MAX_LOGO_FILE_SIZE
def always_want(msg_type: str) -> bool:

View File

@@ -8571,12 +8571,15 @@ paths:
* "D" means the logo is the default Zulip logo.
* "U" means uploaded by an organization administrator.
max_logo_file_size:
max_logo_file_size_mib:
type: integer
description: |
Present if `realm` is present in `fetch_event_types`.
The maximum file size allowed for the uploaded organization logos.
**Changes**: New in Zulip 5.0 (feature level 72). Previously,
this was called `max_logo_file_size`.
realm_bot_domain:
type: string
description: |

View File

@@ -106,7 +106,7 @@ class HomeTest(ZulipTestCase):
"max_avatar_file_size_mib",
"max_file_upload_size_mib",
"max_icon_file_size_mib",
"max_logo_file_size",
"max_logo_file_size_mib",
"max_message_id",
"max_message_length",
"max_stream_description_length",