mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
optimize mailer attachments
This commit is contained in:
1 parent
ed80df1372
commit
2c7f38c503
1 file changed
+2
-3
@@ -87,12 +87,11 @@ class SubmitterMailer < ApplicationMailer
|
||||
end
|
||||
|
||||
documents.each do |attachment|
|
||||
data = attachment.download
|
||||
total_size += data.size
|
||||
total_size += attachment.byte_size
|
||||
|
||||
break if total_size >= MAX_ATTACHMENTS_SIZE
|
||||
|
||||
attachments[attachment.filename.to_s] = data
|
||||
attachments[attachment.filename.to_s] = attachment.download
|
||||
end
|
||||
|
||||
attachments[submitter.submission.audit_trail.filename.to_s] = audit_trail_data if audit_trail_data
|
||||
|
||||
Reference in new issue
Block a user