mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Add config options for max file upload sizes (#2199)
* feat(config): Add config options for max file upload sizes Closes #2198 * Apply suggestions from code review Fix docs and comment in settings.py Co-authored-by: Richard Schreiber <wiffbi@gmail.com> * Fix import order using isort Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
This commit is contained in:
@@ -845,4 +845,10 @@ COUNTRIES_OVERRIDE = {
|
||||
DATA_UPLOAD_MAX_NUMBER_FIELDS = 25000
|
||||
DATA_UPLOAD_MAX_MEMORY_SIZE = 10 * 1024 * 1024 # 10 MB
|
||||
|
||||
# File sizes are in MiB
|
||||
FILE_UPLOAD_MAX_SIZE_IMAGE = 1024 * 1024 * config.getint("pretix_file_upload", "max_size_image", fallback=10)
|
||||
FILE_UPLOAD_MAX_SIZE_FAVICON = 1024 * 1024 * config.getint("pretix_file_upload", "max_size_favicon", fallback=1)
|
||||
FILE_UPLOAD_MAX_SIZE_EMAIL_ATTACHMENT = 1024 * 1024 * config.getint("pretix_file_upload", "max_size_email_attachment", fallback=10)
|
||||
FILE_UPLOAD_MAX_SIZE_OTHER = 1024 * 1024 * config.getint("pretix_file_upload", "max_size_other", fallback=10)
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' # sadly. we would prefer BigInt, and should use it for all new models but the migration will be hard
|
||||
|
||||
Reference in New Issue
Block a user