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:
@@ -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.',
|
||||
),
|
||||
],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user