From f04c8ccc512a4c479afe5af8d8549ae55a84fada Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 6 Sep 2026 16:44:30 +0200 Subject: [PATCH] Raise upload limit to 8 MB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - docker/php/php.ini: upload_max_filesize 8M / post_max_size 10M - docker/nginx/default.conf: client_max_body_size 10M - ArtworkType: Image maxSize 8M with a clear message + help text (local C:\php\php.ini was bumped from 2M the same way — not in the repo) Co-Authored-By: Claude Sonnet 5 --- docker/nginx/default.conf | 2 +- docker/php/php.ini | 4 ++-- src/Form/ArtworkType.php | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 4f8613c..22649c6 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -51,5 +51,5 @@ server { error_log /var/log/nginx/dmtools_error.log; access_log /var/log/nginx/dmtools_access.log; - client_max_body_size 20M; + client_max_body_size 10M; } diff --git a/docker/php/php.ini b/docker/php/php.ini index e6b86eb..3afa980 100644 --- a/docker/php/php.ini +++ b/docker/php/php.ini @@ -5,8 +5,8 @@ memory_limit = 256M max_execution_time = 60 date.timezone = Europe/Amsterdam -upload_max_filesize = 20M -post_max_size = 21M +upload_max_filesize = 8M +post_max_size = 10M realpath_cache_size = 4096K realpath_cache_ttl = 600 diff --git a/src/Form/ArtworkType.php b/src/Form/ArtworkType.php index ef9be94..bc3a93b 100644 --- a/src/Form/ArtworkType.php +++ b/src/Form/ArtworkType.php @@ -22,12 +22,14 @@ class ArtworkType extends AbstractType ->add('file', FileType::class, [ 'label' => 'Image file', 'mapped' => false, + 'help' => 'PNG, JPEG, GIF or WebP, up to 8 MB.', 'constraints' => [ new NotNull(message: 'Please choose an image.'), new Image( - maxSize: '20M', + maxSize: '8M', mimeTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'], mimeTypesMessage: 'Upload a PNG, JPEG, GIF or WebP image.', + maxSizeMessage: 'The image is too large ({{ size }} {{ suffix }}). Max is 8 MB.', ), ], ]);