Review 13.4 Merged

86868[TASK] Streamline MimeTypeValidator option handling in FileUpload

Garvin Hicking CR +2 V +2 Normal +222 −17 updated 11/04/24, 14:26

Commit message

With #103511, the `FileUpload` attribute has been introduced to allow
file upload in extbase. For the `FileSize` and `ImageDimensions`
validators, it is possible to provide all possible validator options
via configuration. For the `MimeTypeValidator`, this is however not
possible and the validator is always initialized with the
`allowedMimeTypes` configuration only.

With this change, the `FileUpload` attribute has been extended to
support the new `mimeType` configuration, which allows to define
all possible options of the `MimeTypeValidator` (`allowedMimeTypes`,
`ignoreFileExtensionCheck`, `notAllowedMessage`,
`invalidExtensionMessage`).

The `allowedMimeTypes` configuration in the `FileUpload` attribute
is kept to ensure backwards compatibility for users already using
this configuration.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
  • Verified V +2 Done
    • Garvin Hicking +2
    • core-ci +1 CI

Issues 2

Files 11

Review log 34

  1. Garvin Hicking commented on patch set 1 11/04/24, 13:44

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 11/04/24, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69035

  3. Garvin Hicking voted on patch set 1 CR +2 V +2 11/04/24, 14:25

  4. Garvin Hicking merged patch set 2 11/04/24, 14:26