Review main Merged

92208[FEATURE] Add original file name to SanitizeFileNameEvent

Torben Hansen CR +2 V +2 Easy +34 −2 updated 12/23/25, 13:31

Commit message

Currently, the `SanitizeFileNameEvent` only receives the
filename after it has already been processed by the
driver's sanitization logic. This prevents event
listeners from knowing the true original filename,
making it difficult to apply custom logic based on
the raw input.

A new getter `getOriginalFileName()` is added to the
event, allowing listeners to access the unsanitized
string.

This enables use cases such as SEO-friendly filename
handling, where a listener can detect spaces in the
original name and replace them with hyphen instead
of the default underscores used by the driver's
standard sanitization.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1113

  1. Torben Hansen uploaded patch set 1 12/22/25, 10:47

  2. core-ci voted on patch set 1 V +1 12/22/25, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92578

  3. Oliver Klee voted on patch set 1 CR +1 V +1 12/22/25, 12:09

  4. Simon Schaufelberger commented on patch set 1 12/23/25, 00:02

    Feature-108558-AddOriginalFileNameToSanitizeFileNameEvent.rst:17

    Please do not overuse php: here as this will create overlays in the docs.
  5. Torben Hansen uploaded patch set 2 CR +1 V +1 12/23/25, 11:16

  6. Torben Hansen commented on patch set 1 12/23/25, 11:17

    Feature-108558-AddOriginalFileNameToSanitizeFileNameEvent.rst:17 Reply

    Done. I however never heard of this. Is it documented somewhere?
  7. Oliver Klee voted on patch set 2 CR +1 V +1 12/23/25, 11:18

  8. core-ci voted on patch set 2 V +1 12/23/25, 11:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92612

  9. Simon Schaufelberger commented on patch set 2 12/23/25, 11:31

    Feature-108558-AddOriginalFileNameToSanitizeFileNameEvent.rst:17 Reply

    I don't know. Ask Lina. She always has lots of extra work to remove them again. And `-` is also no php code by the way ;)
  10. Simon Schaufelberger voted on patch set 2 CR +1 V +1 12/23/25, 12:27

  11. Christian Kuhn commented on patch set 2 12/23/25, 13:31

    "SEO-friendly filenames" ...
  12. Christian Kuhn voted on patch set 2 CR +2 V +2 12/23/25, 13:31

  13. Christian Kuhn merged patch set 3 12/23/25, 13:31