mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
thumbnail: Fix MAX_EMOJI_GIF_FILE_SIZE_BYTES check to be post-resize.
This check was intended to check the post-resized image size, not the pre-resized image.
This commit is contained in:
committed by
Tim Abbott
parent
544d3df057
commit
262689da76
@@ -361,7 +361,7 @@ def upload_emoji_image(
|
|||||||
if still_image_data is not None:
|
if still_image_data is not None:
|
||||||
if len(still_image_data) > MAX_EMOJI_GIF_FILE_SIZE_BYTES: # nocoverage
|
if len(still_image_data) > MAX_EMOJI_GIF_FILE_SIZE_BYTES: # nocoverage
|
||||||
raise BadImageError(_("Image size exceeds limit"))
|
raise BadImageError(_("Image size exceeds limit"))
|
||||||
elif len(image_data) > MAX_EMOJI_GIF_FILE_SIZE_BYTES: # nocoverage
|
elif len(resized_image_data) > MAX_EMOJI_GIF_FILE_SIZE_BYTES: # nocoverage
|
||||||
raise BadImageError(_("Image size exceeds limit"))
|
raise BadImageError(_("Image size exceeds limit"))
|
||||||
backend.upload_single_emoji_image(emoji_path, content_type, user_profile, resized_image_data)
|
backend.upload_single_emoji_image(emoji_path, content_type, user_profile, resized_image_data)
|
||||||
if still_image_data is None:
|
if still_image_data is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user