mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Rename and document the maximum email attachment size setting, to address #846
This commit is contained in:
parent
981eb323c2
commit
2a3fc0894d
@ -82,6 +82,10 @@ These changes are visible throughout django-helpdesk
|
||||
|
||||
**Default:** ``HELPDESK_EMAIL_FALLBACK_LOCALE = "en"``
|
||||
|
||||
- **HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE** Maximum size, in bytes, of file attachments that will be sent via email
|
||||
|
||||
**Default:** ``HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE = 512000``
|
||||
|
||||
- **QUEUE_EMAIL_BOX_UPDATE_ONLY** Only process mail with a valid tracking ID; all other mail will be ignored instead of creating a new ticket.
|
||||
|
||||
**Default:** ``QUEUE_EMAIL_BOX_UPDATE_ONLY = False``
|
||||
|
@ -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
|
||||
|
@ -122,6 +122,10 @@ if HELPDESK_EMAIL_SUBJECT_TEMPLATE.find("ticket.ticket") < 0:
|
||||
# default fallback locale when queue locale not found
|
||||
HELPDESK_EMAIL_FALLBACK_LOCALE = getattr(settings, 'HELPDESK_EMAIL_FALLBACK_LOCALE', 'en')
|
||||
|
||||
# default maximum email attachment size, in bytes
|
||||
# only attachments smaller than this size will be sent via email
|
||||
HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE = getattr(settings, 'HELPDESK_MAX_EMAIL_ATTACHMENT_SIZE', 512000)
|
||||
|
||||
|
||||
########################################
|
||||
# options for staff.create_ticket view #
|
||||
|
Loading…
Reference in New Issue
Block a user