mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX: Calculate email attachment size limit correctly (#11321)
When calculating whether the attached uploads went over the SiteSetting.email_total_attachment_size_limit_kb.kilobytes limit, we were using the original_upload for the calculation instead of the actually attached_upload, which will be smaller in most cases because it can be an optimized image.
This commit is contained in:
@ -281,7 +281,7 @@ module Email
|
||||
end
|
||||
|
||||
attached_upload = optimized_1X || original_upload
|
||||
next if email_size + original_upload.filesize > max_email_size
|
||||
next if email_size + attached_upload.filesize > max_email_size
|
||||
|
||||
begin
|
||||
path = if attached_upload.local?
|
||||
|
Reference in New Issue
Block a user