Rename and document the maximum email attachment size setting, to address #846

This commit is contained in:
Garret Wassermann
2020-07-30 02:54:03 -04:00
parent 981eb323c2
commit 2a3fc0894d
3 changed files with 10 additions and 2 deletions

View File

@ -311,7 +311,7 @@ def text_is_spam(text, request):
def process_attachments(followup, attached_files):
max_email_attachment_size = getattr(settings, 'MAX_EMAIL_ATTACHMENT_SIZE', 512000)
max_email_attachment_size = getattr(settings, 'HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE', 512000)
attachments = []
for attached in attached_files:
@ -330,7 +330,7 @@ def process_attachments(followup, attached_files):
if attached.size < max_email_attachment_size:
# Only files smaller than 512kb (or as defined in
# settings.MAX_EMAIL_ATTACHMENT_SIZE) are sent via email.
# settings.HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE) are sent via email.
attachments.append([filename, att.file])
return attachments