92018[FEATURE] Add multiple file upload support for EXT:form
Commit message
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
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-105708-MultipleFileUploadForFormFramework.rst11new+222 −0
- typo3/sysext/form/Classes/Domain/Finishers/DeleteUploadsFinisher.php2+30 −6
- typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php+15 −4
- typo3/sysext/form/Classes/Domain/Finishers/SaveToDatabaseFinisher.php+26 −10
- typo3/sysext/form/Classes/Domain/Model/FormElements/FileUpload.php7+7 −19
- typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php6+316 −56
- typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php+24 −14
- typo3/sysext/form/Classes/Mvc/Validation/FileSizeValidator.php+1 −1
- typo3/sysext/form/Classes/Mvc/Validation/MimeTypeValidator.php+1 −1
- typo3/sysext/form/Classes/Mvc/Validation/ObjectStorageElementValidatorInterface.phpnew+32 −0
- typo3/sysext/form/Classes/Mvc/ProcessingRule.php+18 −2
- typo3/sysext/form/Classes/Security/HashScope.php+1 −0
- typo3/sysext/form/Classes/ViewHelpers/Form/UploadDeleteCheckboxViewHelper.php3new+115 −0
- typo3/sysext/form/Classes/ViewHelpers/Form/UploadedResourceViewHelper.php+21 −9
- typo3/sysext/form/Classes/ViewHelpers/RenderFormValueViewHelper.php+8 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/FileUpload.yaml+37 −0
- typo3/sysext/form/Configuration/Yaml/FormElements/ImageUpload.yaml+37 −1
- typo3/sysext/form/Resources/Private/Frontend/Partials/FileUpload.fluid.html+39 −3
- typo3/sysext/form/Resources/Private/Frontend/Partials/ImageUpload.fluid.html7+43 −5
- typo3/sysext/form/Resources/Private/Frontend/Partials/SummaryPage.fluid.html+28 −1
Show 12 more files
- typo3/sysext/form/Resources/Private/Language/Database.xlf+13 −1
- typo3/sysext/form/Resources/Private/Language/locallang.xlf+3 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-attachment-1.pdfnew+12 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-attachment-2.pdfnew+12 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-attachment-3.pdfnew+12 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-document.pdfnew+12 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-image-1.jpgnew+7 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-image-2.jpgnew+7 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/Fixtures/test-image-3.jpgnew+7 −0
- typo3/sysext/form/Tests/Functional/Mvc/Property/TypeConverter/MultipleFileUploadTest.php2new+1110 −0
- typo3/sysext/form/Tests/Functional/ViewHelpers/Form/UploadedResourceViewHelperTest.php+41 −0
- typo3/sysext/form/Tests/Unit/Domain/FormElements/FileUploadTest.php+21 −53
Review log 83122
Show 6397 earlier messages
-
Markus Hofmann uploaded patch set 1 12/05/25, 21:06
-
Markus Hofmann updated the commit message in patch set 2 12/05/25, 21:12
-
Stefan Bürk marked it work in progress 12/05/25, 21:13
-
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
-
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
-
Markus Hofmann uploaded patch set 3
V +112/05/25, 22:24 -
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
-
Markus Hofmann uploaded patch set 4
V +112/06/25, 00:41 -
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
-
Markus Hofmann uploaded patch set 5
V -112/06/25, 00:54 -
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
-
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! -
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. -
Markus Hofmann uploaded patch set 6
V +112/22/25, 11:41 -
Markus Hofmann uploaded patch set 7 12/22/25, 11:47
-
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
-
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
-
Markus Hofmann rebased onto patch set 8
V +101/16/26, 17:21 -
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
-
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? -
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. -
Markus Hofmann uploaded patch set 9
V +102/06/26, 09:17 -
Markus Hofmann rebased onto patch set 10 02/06/26, 09: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
-
Markus Hofmann uploaded patch set 11 02/06/26, 09:30
-
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
-
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
-
Josua Vogel uploaded patch set 12
V +102/16/26, 13:53 -
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
-
Josua Vogel uploaded patch set 13
V -102/16/26, 14:59 -
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
-
Josua Vogel uploaded patch set 14
V -102/16/26, 15:31 -
Josua Vogel uploaded patch set 15 02/16/26, 15:42
-
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
-
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
-
Josua Vogel uploaded patch set 16
V -102/16/26, 16:53 -
Josua Vogel uploaded patch set 17 02/16/26, 16:59
-
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
-
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
-
Josua Vogel uploaded patch set 18
V -102/16/26, 17:28 -
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
-
Markus Hofmann commented on patch set 18 02/16/26, 17:42
This change is ready for review. -
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. -
Josua Vogel rebased onto patch set 19
V +102/16/26, 17:50 -
Josua Vogel commented on patch set 18 02/16/26, 17:50
Reply
Done -
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
-
Garvin Hicking commented on patch set 19 02/16/26, 18:15
README.md:3I 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. ;) -
Josua Vogel uploaded patch set 20
V +102/16/26, 18:18 -
Josua Vogel commented on patch set 20 02/16/26, 18:18
README.md:3ReplyDone -
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
-
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:85I 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:56Use a fqdn import shortform here (and below)ImageUpload.fluid.html:26Maybe 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:38Pleae use new translation donain syntax here -
Garvin Hicking commented on patch set 20 02/16/26, 18:57
MultipleFileUploadTest.php:341I don't think we need to cover this scenario that a fixture is missing -
Markus Hofmann uploaded patch set 21
V +102/18/26, 17:28 -
Markus Hofmann commented on patch set 20 02/18/26, 17:28
Feature-105708-MultipleFileUploadForFormFramework.rst:27ReplyAcknowledgedDeleteUploadsFinisher.php:56ReplyAcknowledgedImageUpload.fluid.html:26ReplyDo you have any idea, how to name the class?ImageUpload.fluid.html:38ReplyAcknowledgedMultipleFileUploadTest.php:341ReplyAcknowledged -
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
-
Markus Hofmann uploaded patch set 22
V +102/18/26, 18:03 -
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
-
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? -
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. -
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) -
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 -
Josua Vogel commented on patch set 22 02/18/26, 20:31
ImageUpload.fluid.html:26ReplyI will suggest a naming tomorrow -
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:26ReplyAdded some in the meantime, but if this changes, I'm fine. -
Markus Hofmann commented on patch set 22 02/18/26, 22:18
Feature-105708-MultipleFileUploadForFormFramework.rst:85ReplyAdded the possibility, but have no clue how to write the documentation to this. -
Josua Vogel commented on patch set 22 02/19/26, 15:04
Feature-105708-MultipleFileUploadForFormFramework.rst:85ReplyI will add this -
Josua Vogel uploaded patch set 23
V +102/20/26, 07:11 -
Josua Vogel commented on patch set 23 02/20/26, 07:13
Feature-105708-MultipleFileUploadForFormFramework.rst:85ReplyDone. In addition I renamed the option from deletable to allowRemoval - I think that fits better.ImageUpload.fluid.html:26ReplyI changed the class names, to be more specific -
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. -
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
-
Josua Vogel uploaded patch set 24
V -102/20/26, 07:25 -
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
-
Josua Vogel uploaded patch set 25
V -102/20/26, 08:04 -
Josua Vogel uploaded patch set 26 02/20/26, 08:14
-
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
-
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
-
Josua Vogel voted on patch set 26 CR +1 V +1 02/20/26, 08:28
-
Josua Vogel uploaded patch set 27
CR +1V +102/20/26, 10:34 -
Josua Vogel uploaded patch set 28 02/20/26, 10:35
-
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
-
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
-
Josua Vogel voted on patch set 28 CR +1 V +1 02/20/26, 11:16
-
Garvin Hicking commented on patch set 28 02/20/26, 13:36
UploadedFileReferenceConverter.php:149Hm, 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:154I 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? -
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. -
Josua Vogel uploaded patch set 29
CR +1V +102/20/26, 15:45 -
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
-
Josua Vogel uploaded patch set 30
V -102/20/26, 16:40 -
Josua Vogel uploaded patch set 31 02/20/26, 16:43
-
Josua Vogel uploaded patch set 32 02/20/26, 17:14
-
Josua Vogel commented on patch set 32 02/20/26, 17:20
Reply
this problems are fixedUploadedFileReferenceConverter.php:149ReplyaddedUploadedFileReferenceConverter.php:154Replyadded a comment -
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
-
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
-
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
-
Josua Vogel uploaded patch set 33
V -102/20/26, 19:55 -
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
-
Garvin Hicking uploaded patch set 34
V -102/20/26, 20:26cgl -
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
-
Garvin Hicking commented on patch set 34 V +1 02/20/26, 20:54
Reply
DoneThis works quite well! IMO we are very near a well-rounded solution.Feature-105708-MultipleFileUploadForFormFramework.rst:126Do 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:78I 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:149ReplyDoneUploadedFileReferenceConverter.php:154ReplyDoneUploadDeleteCheckboxViewHelper.php:43Having 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?
-
Josua Vogel commented on patch set 34 02/20/26, 22:18
Feature-105708-MultipleFileUploadForFormFramework.rst:126ReplyYes, a little bit more documentation never hurt nobody -
Josua Vogel commented on patch set 34 02/21/26, 11:40
UploadDeleteCheckboxViewHelper.php:43ReplyDifficult, 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. -
Josua Vogel uploaded patch set 35
V +102/21/26, 13:39 -
Josua Vogel commented on patch set 35 02/21/26, 13:41
Feature-105708-MultipleFileUploadForFormFramework.rst:126ReplyDone -
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
-
Josua Vogel uploaded patch set 36
V -102/21/26, 14:03 -
Josua Vogel commented on patch set 35 02/21/26, 14:04
FileUpload.php:78Replyupdated the code and the docs I renamed the interface to CollectionElementValidatorInterface - imo it´s not restricted to files. every ObjectStorage can use this -
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
-
Garvin Hicking commented on patch set 36 02/21/26, 19:20
FileUpload.php:78ReplyThanks! Why not ObjectStorageValidatorInterface then? :) -
Josua Vogel commented on patch set 36 02/21/26, 23:21
FileUpload.php:78ReplyObjectStorageElementValidatorInterface would be the proper name - and I thought that’s too long. :) but I can change it, if you really want -
Garvin Hicking commented on patch set 36 02/21/26, 23:33
FileUpload.php:78ReplyYeah I think we should utizile that ObjectStorage buzzword rather than using less commin collection naming for it -
Josua Vogel uploaded patch set 37
V +102/22/26, 14:10 -
Josua Vogel commented on patch set 37 02/22/26, 14:10
FileUpload.php:78ReplyI renamed the interface -
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
-
Garvin Hicking commented on patch set 37 02/22/26, 15:27
Feature-105708-MultipleFileUploadForFormFramework.rst:175Please also adapt naming hereUploadDeleteCheckboxViewHelper.php:43ReplyI'll resolve this, I follow your argumentation. -
Josua Vogel uploaded patch set 38
V +102/22/26, 15:43 -
Josua Vogel commented on patch set 38 02/22/26, 15:43
Feature-105708-MultipleFileUploadForFormFramework.rst:175ReplyGood catch! -
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
-
Josua Vogel updated the commit message in patch set 39
V +102/22/26, 15:54 -
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
-
Garvin Hicking commented on patch set 39 CR +1 V +1 02/23/26, 19:38
I think that's it! :-) Kudos!FileUpload.php:78ReplyDone -
Josua Vogel voted on patch set 39 CR +1 V +1 02/23/26, 19:46
-
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. -
Garvin Hicking voted on patch set 39 CR +2 V +2 02/24/26, 12:10
-
Garvin Hicking merged patch set 40 02/24/26, 12:10