mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
uploads: Remove unusable UI elements if file uploading is disabled.
If MAX_FILE_UPLOAD_SIZE is set to 0, then UI elements like the upload icon in the compose and message edit UI and "Attachments" menu in "/#settings" are not displayed. A different error message is also displayed if a user tries to drag and drop or paste a file into the compose message box. Fixes #12152.
This commit is contained in:
@@ -304,6 +304,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
|
||||
'enable_feedback': settings.ENABLE_FEEDBACK,
|
||||
'embedded': narrow_stream is not None,
|
||||
'invite_as': PreregistrationUser.INVITE_AS,
|
||||
'max_file_upload_size': settings.MAX_FILE_UPLOAD_SIZE,
|
||||
},)
|
||||
patch_cache_control(response, no_cache=True, no_store=True, must_revalidate=True)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user