From ed750ffd35a2b82506b5738d1329632bfbe4a831 Mon Sep 17 00:00:00 2001 From: Mathieu Pillard Date: Wed, 16 Oct 2024 17:59:47 +0200 Subject: [PATCH] Tweak file upload limits: bump max uncompressed size, round down max upload size (#22773) --- src/olympia/lib/settings_base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/olympia/lib/settings_base.py b/src/olympia/lib/settings_base.py index 3fb3ce01b17..e1c2d72ee80 100644 --- a/src/olympia/lib/settings_base.py +++ b/src/olympia/lib/settings_base.py @@ -1131,10 +1131,12 @@ def read_only_mode(env): MAX_ICON_UPLOAD_SIZE = MAX_IMAGE_UPLOAD_SIZE MAX_PHOTO_UPLOAD_SIZE = MAX_IMAGE_UPLOAD_SIZE MAX_STATICTHEME_SIZE = 7 * 1024 * 1024 -MAX_ZIP_UNCOMPRESSED_SIZE = 200 * 1024 * 1024 +MAX_ZIP_UNCOMPRESSED_SIZE = 250 * 1024 * 1024 # Not a Django setting -- needs to be implemented by relevant forms -# See: validate_review_attachment() -MAX_UPLOAD_SIZE = 200 * 1024 * 1024 +# See SourceForm, _submit_upload(), validate_review_attachment(), etc. Since it +# is displayed to users with filesizeformat it should be using powers of 1000 +# to be displayed correctly. +MAX_UPLOAD_SIZE = 200 * 1000 * 1000 # File uploads should have -rw-r--r-- permissions in order to be served by # nginx later one. The 0o prefix is intentional, this is an octal value.