Review main Merged

92018[FEATURE] Add multiple file upload support for EXT:form

Markus Hofmann CR +2 V +2 Expert +2278 −186 updated 02/24/26, 12:10

Commit message

This patch adds support for uploading multiple files at once
using the FileUpload and ImageUpload form elements in EXT:form.

New features:
- New "multiple" property for FileUpload and ImageUpload elements
- Checkbox editor in Form Editor backend module to enable multi-upload
- HMAC-secured file deletion mechanism (similar to Extbase)
- New UploadDeleteCheckboxViewHelper for custom templates
- Updated templates for summary page and email finishers

Technical changes:
- UploadedFileReferenceConverter: Handle arrays of UploadedFile objects
  and ObjectStorage return type for multiple uploads
- New HashScope::DeleteFile for HMAC-signed deletion requests
- New UploadDeleteCheckboxViewHelper in EXT:form
- Updated Fluid templates: FileUpload, ImageUpload, SummaryPage,
  Email templates (HTML and TXT)
- Updated YAML configuration for FileUpload and ImageUpload elements

Finisher support:
- EmailFinisher: Attaches all uploaded files, displays filenames in list
- SaveToDatabaseFinisher: Stores multiple file UIDs as comma-separated list
- DeleteUploadsFinisher: Removes all uploaded files from ObjectStorage

Review

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

Issues 3

Files 32

Show 12 more files

Review log 83122

Show 6397 earlier messages
  1. Markus Hofmann uploaded patch set 1 12/05/25, 21:06

  2. Markus Hofmann updated the commit message in patch set 2 12/05/25, 21:12

  3. Stefan Bürk marked it work in progress 12/05/25, 21:13

  4. core-ci voted on patch set 1 V +1 12/05/25, 21:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91684

  5. core-ci voted on patch set 2 V +1 12/05/25, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91685

  6. Markus Hofmann uploaded patch set 3 V +1 12/05/25, 22:24

  7. core-ci voted on patch set 3 V +1 12/05/25, 22:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91691

  8. Markus Hofmann uploaded patch set 4 V +1 12/06/25, 00:41

  9. core-ci voted on patch set 4 V -1 12/06/25, 00:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91692

  10. Markus Hofmann uploaded patch set 5 V -1 12/06/25, 00:54

  11. core-ci voted on patch set 5 V +1 12/06/25, 01:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91698

  12. Garvin Hicking commented on patch set 5 12/06/25, 04:34

    Maybe we can realize this a bit similar to the extbase file upload tests: https://review.typo3.org/c/Packages/TYPO3.CMS/+/90226 We could create a setup with the form plugin in place cinfigured for multiple uploads, the also POST data to that like for the extbase test, and then later on verify if the files are persisted...? Thanks for getting on this, I think this is a nice feature enhancement!
  13. Markus Hofmann commented on patch set 5 12/06/25, 09:49

    Reply

    That's a good idea, I will take a look inside and see, how to implement. First manual tests went good for most cases, but having automatic tests will be much better.
  14. Markus Hofmann uploaded patch set 6 V +1 12/22/25, 11:41

  15. Markus Hofmann uploaded patch set 7 12/22/25, 11:47

  16. core-ci voted on patch set 6 V -1 12/22/25, 11:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92579

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

  18. Markus Hofmann rebased onto patch set 8 V +1 01/16/26, 17:21

  19. core-ci voted on patch set 8 V +1 01/16/26, 17:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93623

  20. Josua Vogel commented on patch set 8 02/06/26, 09:09

    Reply

    Hi @typo3@calien.de , are you still on this - providing automatic tests? Or is this ready for review?
  21. Markus Hofmann commented on patch set 8 02/06/26, 09:17

    Reply

    Hey @j.vogel97@web.de, I'd like to implement tests for this functionality, but as usual, time is missing.
  22. Markus Hofmann uploaded patch set 9 V +1 02/06/26, 09:17

  23. Markus Hofmann rebased onto patch set 10 02/06/26, 09:24

  24. core-ci voted on patch set 9 V -1 02/06/26, 09:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95253

  25. Markus Hofmann uploaded patch set 11 02/06/26, 09:30

  26. core-ci voted on patch set 10 V -1 02/06/26, 09:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95255

  27. core-ci voted on patch set 11 V +1 02/06/26, 09:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95256

  28. Josua Vogel uploaded patch set 12 V +1 02/16/26, 13:53

  29. core-ci voted on patch set 12 V -1 02/16/26, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95965

  30. Josua Vogel uploaded patch set 13 V -1 02/16/26, 14:59

  31. core-ci voted on patch set 13 V -1 02/16/26, 15:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95971

  32. Josua Vogel uploaded patch set 14 V -1 02/16/26, 15:31

  33. Josua Vogel uploaded patch set 15 02/16/26, 15:42

  34. core-ci voted on patch set 14 V -1 02/16/26, 15:43 Copied votes on follow-up patch sets have been updated: * Verified-1 has been copied to patch set 15 (copy condition: "changekind:NO_CHANGE"). Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95975

  35. core-ci voted on patch set 15 V -1 02/16/26, 15:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95977

  36. Josua Vogel uploaded patch set 16 V -1 02/16/26, 16:53

  37. Josua Vogel uploaded patch set 17 02/16/26, 16:59

  38. core-ci voted on patch set 16 V -1 02/16/26, 17:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95981

  39. core-ci voted on patch set 17 V -1 02/16/26, 17:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95982

  40. Josua Vogel uploaded patch set 18 V -1 02/16/26, 17:28

  41. core-ci voted on patch set 18 V +1 02/16/26, 17:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95988

  42. Markus Hofmann commented on patch set 18 02/16/26, 17:42

    This change is ready for review.
  43. Markus Hofmann commented on patch set 18 02/16/26, 17:43

    A really big thanks to @j.vogel97@web.de for adding the tests and finishing. Marked as ready and will test these days, too.
  44. Josua Vogel rebased onto patch set 19 V +1 02/16/26, 17:50

  45. Josua Vogel commented on patch set 18 02/16/26, 17:50

    Reply

    Done
  46. core-ci voted on patch set 19 V +1 02/16/26, 17:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95989

  47. Garvin Hicking commented on patch set 19 02/16/26, 18:15

    README.md:3

    I think it's sufficient to add some inline code comment to the test file utilizing this fixture, we don't need a readme file. Also this reads like AI boilerplate and carries no real helpful info. ;)
  48. Josua Vogel uploaded patch set 20 V +1 02/16/26, 18:18

  49. Josua Vogel commented on patch set 20 02/16/26, 18:18

    README.md:3 Reply

    Done
  50. core-ci voted on patch set 20 V +1 02/16/26, 18:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95992

  51. Garvin Hicking commented on patch set 20 02/16/26, 18:29

    Feature-105708-MultipleFileUploadForFormFramework.rst:27

    ```suggestion .. code-block:: yaml :caption: fileadmin/form_definitions/someForm.yaml :emphasize-lines: 14,24 ``` (Not sure I counted lines properly please verify)

    Feature-105708-MultipleFileUploadForFormFramework.rst:85

    I feel a bit uneasy having this always enbled. I would prefer to opt into this with a checkbox that's not enabled by default in the GUI. In extbase this also needs an opt in and I'd rather have this tested more thoroughly before we enable this everywhere.

    DeleteUploadsFinisher.php:56

    Use a fqdn import shortform here (and below)

    ImageUpload.fluid.html:26

    Maybe use a CSS class here for styling? And maybe give a CSS class to the li element too woth the imagetype it has?

    ImageUpload.fluid.html:38

    Pleae use new translation donain syntax here
  52. Garvin Hicking commented on patch set 20 02/16/26, 18:57

    MultipleFileUploadTest.php:341

    I don't think we need to cover this scenario that a fixture is missing
  53. Markus Hofmann uploaded patch set 21 V +1 02/18/26, 17:28

  54. Markus Hofmann commented on patch set 20 02/18/26, 17:28

    Feature-105708-MultipleFileUploadForFormFramework.rst:27 Reply

    Acknowledged

    DeleteUploadsFinisher.php:56 Reply

    Acknowledged

    ImageUpload.fluid.html:26 Reply

    Do you have any idea, how to name the class?

    ImageUpload.fluid.html:38 Reply

    Acknowledged

    MultipleFileUploadTest.php:341 Reply

    Acknowledged
  55. core-ci voted on patch set 21 V +1 02/18/26, 17:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96181

  56. Markus Hofmann uploaded patch set 22 V +1 02/18/26, 18:03

  57. core-ci voted on patch set 22 V +1 02/18/26, 18:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96182

  58. Markus Hofmann commented on patch set 22 02/18/26, 18:20

    @j.vogel97@web.de I guess, it would be better to split the file removal into a separate feature, so we can concentrate on the multi file upload first and then add the removal on edit function?
  59. Josua Vogel commented on patch set 22 02/18/26, 19:53

    Reply

    No, we can keep the file removal in this patch. I think we have enough time to complete this. I saw, that you already pushed a checkbox to enable the deletion feature. I will think about it in the next days, but I am convinced, that this will be no blocker.
  60. Garvin Hicking commented on patch set 22 02/18/26, 20:26

    Reply

    Yeah from my side this is not a blocker. The checkbox would make me happy and I also think it should be feasible. While you're at it: how about limiting the number of file uplooads? Currently you could upload a thousand files I guess? And maybe configure combined file size upload limit too? Or did I oversee how this is handled already? (Did not test yet)
  61. Josua Vogel commented on patch set 22 02/18/26, 20:30

    Reply

    Had the same thoughts, but maybe we do this in a separate patch? If it is easy to implement, we can donor already in this one
  62. Josua Vogel commented on patch set 22 02/18/26, 20:31

    ImageUpload.fluid.html:26 Reply

    I will suggest a naming tomorrow
  63. Markus Hofmann commented on patch set 22 02/18/26, 22:18

    Reply

    Okay, if you boith think, we will make it into 14, I'm fine. Was just a small idea.

    ImageUpload.fluid.html:26 Reply

    Added some in the meantime, but if this changes, I'm fine.
  64. Markus Hofmann commented on patch set 22 02/18/26, 22:18

    Feature-105708-MultipleFileUploadForFormFramework.rst:85 Reply

    Added the possibility, but have no clue how to write the documentation to this.
  65. Josua Vogel commented on patch set 22 02/19/26, 15:04

    Feature-105708-MultipleFileUploadForFormFramework.rst:85 Reply

    I will add this
  66. Josua Vogel uploaded patch set 23 V +1 02/20/26, 07:11

  67. Josua Vogel commented on patch set 23 02/20/26, 07:13

    Feature-105708-MultipleFileUploadForFormFramework.rst:85 Reply

    Done. In addition I renamed the option from deletable to allowRemoval - I think that fits better.

    ImageUpload.fluid.html:26 Reply

    I changed the class names, to be more specific
  68. Josua Vogel commented on patch set 23 02/20/26, 07:15

    @garvin@hick.ing I also added a validator for the number of files.
  69. core-ci voted on patch set 23 V -1 02/20/26, 07:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96305

  70. Josua Vogel uploaded patch set 24 V -1 02/20/26, 07:25

  71. core-ci voted on patch set 24 V -1 02/20/26, 07:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96307

  72. Josua Vogel uploaded patch set 25 V -1 02/20/26, 08:04

  73. Josua Vogel uploaded patch set 26 02/20/26, 08:14

  74. core-ci voted on patch set 25 V -1 02/20/26, 08:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96311

  75. core-ci voted on patch set 26 V +1 02/20/26, 08:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96312

  76. Josua Vogel voted on patch set 26 CR +1 V +1 02/20/26, 08:28

  77. Josua Vogel uploaded patch set 27 CR +1 V +1 02/20/26, 10:34

  78. Josua Vogel uploaded patch set 28 02/20/26, 10:35

  79. core-ci voted on patch set 27 V -1 02/20/26, 10:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96332

  80. core-ci voted on patch set 28 V +1 02/20/26, 11:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96333

  81. Josua Vogel voted on patch set 28 CR +1 V +1 02/20/26, 11:16

  82. Garvin Hicking commented on patch set 28 02/20/26, 13:36

    UploadedFileReferenceConverter.php:149

    Hm, how does this code execution ensure that files are only deleted if the form's "allowRemoval" feature is enabled? Seems to me this happens purely based on the submitted input data. Even though it's HMAC protected I would prefer that we do not operate on input data here in case the form's configuration is not meant for it (Probably it's hard to get to the form config from within the typeconverter at this point?!)

    UploadedFileReferenceConverter.php:154

    I assume you do that to check if you have a multidimensional array or not? The keyword "error" is a bit misleading here. Please add a comment for the intent - or do you maybe know a better way to check for the proper "dimensionality" of the array?
  83. Garvin Hicking commented on patch set 28 V -1 02/20/26, 14:07

    Just have to note this down as I have to leave now: - filesize validator seems to not work for multi file upload and cause uploads to not be accepted (multifile upload) - propagating file uploads to more than 1 steps seems to clear them (not sure if caused by the patch or already like this now) - single file upload has attribute "allowRemoval" checked, but does not show removal checkboxes.
  84. Josua Vogel uploaded patch set 29 CR +1 V +1 02/20/26, 15:45

  85. core-ci voted on patch set 29 V -1 02/20/26, 16:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96377

  86. Josua Vogel uploaded patch set 30 V -1 02/20/26, 16:40

  87. Josua Vogel uploaded patch set 31 02/20/26, 16:43

  88. Josua Vogel uploaded patch set 32 02/20/26, 17:14

  89. Josua Vogel commented on patch set 32 02/20/26, 17:20

    Reply

    this problems are fixed

    UploadedFileReferenceConverter.php:149 Reply

    added

    UploadedFileReferenceConverter.php:154 Reply

    added a comment
  90. core-ci voted on patch set 30 V -1 02/20/26, 17:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96383

  91. core-ci voted on patch set 31 V -1 02/20/26, 17:30 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96384

  92. core-ci voted on patch set 32 V -1 02/20/26, 17:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96390

  93. Josua Vogel uploaded patch set 33 V -1 02/20/26, 19:55

  94. core-ci voted on patch set 33 V -1 02/20/26, 20:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96400

  95. Garvin Hicking uploaded patch set 34 V -1 02/20/26, 20:26

    cgl
  96. core-ci voted on patch set 34 V +1 02/20/26, 20:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96401

  97. Garvin Hicking commented on patch set 34 V +1 02/20/26, 20:54

    Reply

    Done
    This works quite well! IMO we are very near a well-rounded solution.

    Feature-105708-MultipleFileUploadForFormFramework.rst:126

    Do we need another documentation update to explain "How to mare my own Finisher compatible with multiple files"? We could give a code example on how these finishers here were adapted (iterating objectstorage).

    FileUpload.php:78

    I think this could be a breaking change to third party validators, which would suddenly no longer be applied/evaluated to FileUpload form elements. We would need to require consumers to implement this interface, otherwise the validator would be filtered out if I read the code right here. Wouldn't it work without this restriction, just with the code in `ProcessingRule`? I think we can keep the interface, and let EXT:form's validators implement it as opt-in for the future and compatibility to multi-file resourcces, and react on it internally - but the fallback for existing validators must be that they can interoperate with resource objects like before, and only our interface-implementing validators should then react and validate on ObjectStorage file collections. Also we should document in the feature ReST that there is a new interface which validators can implement to be able to operate on nested ObjectStorage structures, right? (Also: How about "FileResourceValidatorInterface" instead?)

    UploadedFileReferenceConverter.php:149 Reply

    Done

    UploadedFileReferenceConverter.php:154 Reply

    Done

    UploadDeleteCheckboxViewHelper.php:43

    Having two viewhelpers with this, one being "f:form.uploadDeleteCheckbox" and the other "form:uploadDeleteCheckbox" is IMO a bit misleading doe to both being called "form". I would prefer we rename this one to something like "UploadedResourceRemovalViewHelper". What do you think?
  1. Josua Vogel commented on patch set 34 02/20/26, 22:18

    Feature-105708-MultipleFileUploadForFormFramework.rst:126 Reply

    Yes, a little bit more documentation never hurt nobody
  2. Josua Vogel commented on patch set 34 02/21/26, 11:40

    UploadDeleteCheckboxViewHelper.php:43 Reply

    Difficult, there are good arguments for both. My intention was to use the same name to make it easier to use. People are already familiar with the exbase view helper, so it would be intuitive. And when searching the project, you can find all the places where a delete checkbox is used. I'm a fan of consistency :) But I understand your argument. A third opinion would be good.
  3. Josua Vogel uploaded patch set 35 V +1 02/21/26, 13:39

  4. Josua Vogel commented on patch set 35 02/21/26, 13:41

    Feature-105708-MultipleFileUploadForFormFramework.rst:126 Reply

    Done
  5. core-ci voted on patch set 35 V -1 02/21/26, 13:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96449

  6. Josua Vogel uploaded patch set 36 V -1 02/21/26, 14:03

  7. Josua Vogel commented on patch set 35 02/21/26, 14:04

    FileUpload.php:78 Reply

    updated the code and the docs I renamed the interface to CollectionElementValidatorInterface - imo it´s not restricted to files. every ObjectStorage can use this
  8. core-ci voted on patch set 36 V +1 02/21/26, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96450

  9. Garvin Hicking commented on patch set 36 02/21/26, 19:20

    FileUpload.php:78 Reply

    Thanks! Why not ObjectStorageValidatorInterface then? :)
  10. Josua Vogel commented on patch set 36 02/21/26, 23:21

    FileUpload.php:78 Reply

    ObjectStorageElementValidatorInterface would be the proper name - and I thought that’s too long. :) but I can change it, if you really want
  11. Garvin Hicking commented on patch set 36 02/21/26, 23:33

    FileUpload.php:78 Reply

    Yeah I think we should utizile that ObjectStorage buzzword rather than using less commin collection naming for it
  12. Josua Vogel uploaded patch set 37 V +1 02/22/26, 14:10

  13. Josua Vogel commented on patch set 37 02/22/26, 14:10

    FileUpload.php:78 Reply

    I renamed the interface
  14. core-ci voted on patch set 37 V +1 02/22/26, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96505

  15. Garvin Hicking commented on patch set 37 02/22/26, 15:27

    Feature-105708-MultipleFileUploadForFormFramework.rst:175

    Please also adapt naming here

    UploadDeleteCheckboxViewHelper.php:43 Reply

    I'll resolve this, I follow your argumentation.
  16. Josua Vogel uploaded patch set 38 V +1 02/22/26, 15:43

  17. Josua Vogel commented on patch set 38 02/22/26, 15:43

    Feature-105708-MultipleFileUploadForFormFramework.rst:175 Reply

    Good catch!
  18. core-ci voted on patch set 38 V +1 02/22/26, 15:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96513

  19. Josua Vogel updated the commit message in patch set 39 V +1 02/22/26, 15:54

  20. core-ci voted on patch set 39 V +1 02/22/26, 16:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96514

  21. Garvin Hicking commented on patch set 39 CR +1 V +1 02/23/26, 19:38

    I think that's it! :-) Kudos!

    FileUpload.php:78 Reply

    Done
  22. Josua Vogel voted on patch set 39 CR +1 V +1 02/23/26, 19:46

  23. Markus Hofmann commented on patch set 39 02/24/26, 08:15

    Thank you, @j.vogel97@web.de for the help and @garvin@hick.ing for the reviews and input. It would take much more time for me finishing this.
  24. Garvin Hicking voted on patch set 39 CR +2 V +2 02/24/26, 12:10

  25. Garvin Hicking merged patch set 40 02/24/26, 12:10