🐛(backend) allow to configure settings DATA_UPLOAD_MAX_MEMORY_SIZE

Release 3.17.2 of DRF now takes care of DATA_UPLOAD_MAX_MEMORY_SIZE
and is checked when the body request is parsed. Before that, DRF wasn't
using it at all and we were only looking for custom settings linked to
the media and conversion file upload. We must now also configure this
setting.
This commit is contained in:
Manuel Raynaud
2026-09-04 10:21:43 +02:00
parent b32b3f08c2
commit 3bede0d9a0
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -9,6 +9,7 @@ and this project adheres to
### Fixed
- 🐛(frontend) hide Leave in the doc menu when not logged in #2626
- 🐛(backend) allow to configure settings DATA_UPLOAD_MAX_MEMORY_SIZE
## [v5.6.0] - 2026-09-03
+1
View File
@@ -61,6 +61,7 @@ These are the environment variables you can set for the `impress-backend` contai
| DJANGO_CORS_ALLOWED_ORIGIN_REGEXES | List of origins allowed for CORS using regulair expressions | [] |
| DJANGO_CORS_ALLOW_ALL_ORIGINS | Allow all CORS origins | false |
| DJANGO_CSRF_TRUSTED_ORIGINS | CSRF trusted origins | [] |
| DJANGO_DATA_UPLOAD_MAX_MEMORY_SIZE | The maximum size in bytes that a request body may be should be equal to the maximum between `DOCUMENT_IMAGE_MAX_SIZE` and `CONVERSION_FILE_MAX_SIZE`. See: https://docs.djangoproject.com/en/6.1/ref/settings/#data-upload-max-memory-size | 20 MB |
| DJANGO_EMAIL_BACKEND | Email backend library | django.core.mail.backends.smtp.EmailBackend |
| DJANGO_EMAIL_BRAND_NAME | Brand name for email | |
| DJANGO_EMAIL_FROM | Email address used as sender | from@example.com |
+3 -1
View File
@@ -206,6 +206,8 @@ class Base(Configuration):
environ_prefix=None,
)
DATA_UPLOAD_MAX_MEMORY_SIZE = values.IntegerValue(20 * MB) # 20 MB
REACTIONS_MAX_PER_COMMENT = values.IntegerValue(
15,
environ_name="REACTIONS_MAX_PER_COMMENT",
@@ -937,7 +939,7 @@ class Base(Configuration):
False, environ_name="CONVERSION_UPLOAD_ENABLED", environ_prefix=None
)
CONVERSION_FILE_MAX_SIZE = values.IntegerValue(
20 * MB,
default=DATA_UPLOAD_MAX_MEMORY_SIZE,
environ_name="CONVERSION_FILE_MAX_SIZE",
environ_prefix=None,
)