Actions
Bug #105532
closedFileUpload: Not all options from MimeTypeValidator can be set
Start date:
2024-11-01
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
13
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The MimeTypeValidator offers the following options:
- allowedMimeTypes
- ignoreFileExtensionCheck
- notAllowedMessage
- invalidExtensionMessage
However, when using the FileUpload annotation, only the first option is actually passed to the MimeTypeValidator.
Example:
#[Extbase\FileUpload([
'validation' => [
'required' => false,
'fileSize' => ['minimum' => '0K', 'maximum' => '8M'],
'allowedMimeTypes' => ['image/png'],
'ignoreFileExtensionCheck' => True,
'notAllowedMessage' => 'LLL:EXT:dummy/Resources/Private/Language/locallang.xlf:validation.mimetype.notAllowedMessage',
'invalidExtensionMessage' => 'LLL:EXT:dummy/Resources/Private/Language/locallang.xlf:validation.mimetype.invalidextension',
],
'uploadFolder' => '1:/user_upload/extbase_multiple_files/',
])]
protected ObjectStorage $files;
Actions