Raise upload limit to 8 MB

- 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 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 16:44:30 +02:00
co-authored by Claude Sonnet 5
parent ed9390319b
commit f04c8ccc51
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -51,5 +51,5 @@ server {
error_log /var/log/nginx/dmtools_error.log; error_log /var/log/nginx/dmtools_error.log;
access_log /var/log/nginx/dmtools_access.log; access_log /var/log/nginx/dmtools_access.log;
client_max_body_size 20M; client_max_body_size 10M;
} }
+2 -2
View File
@@ -5,8 +5,8 @@ memory_limit = 256M
max_execution_time = 60 max_execution_time = 60
date.timezone = Europe/Amsterdam date.timezone = Europe/Amsterdam
upload_max_filesize = 20M upload_max_filesize = 8M
post_max_size = 21M post_max_size = 10M
realpath_cache_size = 4096K realpath_cache_size = 4096K
realpath_cache_ttl = 600 realpath_cache_ttl = 600
+3 -1
View File
@@ -22,12 +22,14 @@ class ArtworkType extends AbstractType
->add('file', FileType::class, [ ->add('file', FileType::class, [
'label' => 'Image file', 'label' => 'Image file',
'mapped' => false, 'mapped' => false,
'help' => 'PNG, JPEG, GIF or WebP, up to 8 MB.',
'constraints' => [ 'constraints' => [
new NotNull(message: 'Please choose an image.'), new NotNull(message: 'Please choose an image.'),
new Image( new Image(
maxSize: '20M', maxSize: '8M',
mimeTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'], mimeTypes: ['image/png', 'image/jpeg', 'image/gif', 'image/webp'],
mimeTypesMessage: 'Upload a PNG, JPEG, GIF or WebP image.', mimeTypesMessage: 'Upload a PNG, JPEG, GIF or WebP image.',
maxSizeMessage: 'The image is too large ({{ size }} {{ suffix }}). Max is 8 MB.',
), ),
], ],
]); ]);