diff --git a/INSTALLATION.md b/INSTALLATION.md index d7a1cda29ae06d99e95d4467ce5553bba8028114..ed7d5cb3b6932fe4964c1fb4c78cee705e7ef6b1 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -15,6 +15,7 @@ Boolean type variables use consider `true` and `yes` as truthy, and `false` and - `INJECT_DOMAIN`: _string, default=""_ - Domain where yours instance of the INJECT is available. - `INJECT_SECRET_KEY`: _string_ - Used to provide cryptographic signing. Must be at least 50 long characters string. - `INJECT_EMAIL_TIMEOUT`: _int, default=10_ - Specifies a timeout in seconds for blocking operations like the connection attempt to SMTP. +- `INJECT_MAX_UPLOAD_SIZE`: _int, default=10MB_ - Specifies the maximum body size of requests, including file uploads. diff --git a/ttxbackend/settings.py b/ttxbackend/settings.py index 42960646cb60c52bd34f78cf52acfdbed9e3d5a0..a91804f6f72941e0c902eede4303eeaa8cf66fea 100644 --- a/ttxbackend/settings.py +++ b/ttxbackend/settings.py @@ -205,6 +205,9 @@ LOG_STORAGE = os.path.join(DATA_STORAGE, "logs") EXPORT_IMPORT_STORAGE = os.path.join(DATA_STORAGE, "export_import") DB_EXPORT_FILE_NAME = "db.json" UPDATE_INTERVAL = 10 +DATA_UPLOAD_MAX_MEMORY_SIZE = int( + os.environ.get("INJECT_MAX_UPLOAD_SIZE", 10 * 2**20) # 10MB +) # Use nose to run all tests TEST_RUNNER = "django_nose.NoseTestSuiteRunner"