Review main Merged

96299[FEATURE] Paste files into file fields in FormEngine to upload

Oli Bartsch CR +2 V +2 Hard +538 −54 updated 10/07/26, 21:01

Commit message

Files copied to the clipboard can now be pasted into a file field of a
record to upload them and add them to the field. They run through the
existing uploader of the field, so its allowed file extensions and the
handling of files that already exist apply as for dropped files.

A record may contain several file fields, each with its own uploader.
The paste is handled by the field the editor clicked into or focused
last. Focus alone is not sufficient, as some browsers do not focus a
button when it is clicked. Without such an interaction, the only
visible file field handles the paste. If several are visible, a modal
asks the editor which field to add the files to. The decision is made
by the new module @typo3/backend/file-paste-handler, which the drag
uploaders of the Media module and of file fields register with.

While a file is dragged over a file field, the dropzone of that field
now covers the whole field, as the dropzone of the Media module covers
the module. Files can be dropped anywhere onto the field instead of onto
a small bar below it. The dropzone closes again when the file leaves the
field, so each field remains a separate target. For this, the drag
uploader accepts the new, optional data-dropzone-area attribute, which
names the ancestor a dragged file has to be over to open the dropzone.

The changelog entry of the Media module feature is extended instead of
adding another one for the same feature, and renamed to match its
broader content.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Wouter Wolters +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Wouter Wolters +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 12

Review log 1623

  1. Oli Bartsch uploaded patch set 1 10/02/26, 08:18

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

  3. Oli Bartsch uploaded patch set 2 V +1 10/02/26, 10:28

  4. core-ci voted on patch set 2 V +1 10/02/26, 10:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109905

  5. Oli Bartsch uploaded patch set 3 V +1 10/05/26, 09:58

  6. core-ci voted on patch set 3 V +1 10/05/26, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110091

  7. Oli Bartsch uploaded patch set 4 V +1 10/05/26, 21:20

  8. core-ci voted on patch set 4 V +1 10/05/26, 21:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110157

  9. Simon Schaufelberger commented on patch set 4 10/05/26, 23:28

    When you upload allowed files and disallowed files one after the other, the block that tells you about the invalid file is shown and hidden again and then shown again with a new entry. what would you expect? I would expect that it would always be shown. what do you think about a backend notification in the bottom corner instead? this would have the advantage that the list won't get too long.
  10. Oli Bartsch commented on patch set 4 10/06/26, 06:51

    Reply

    Seems fair, but this is not related to pasting but concerns the handling in general. Will do this as a separat patch.
  11. Oli Bartsch commented on patch set 4 10/06/26, 07:36

  12. Benni Mack commented on patch set 4 CR -1 10/06/26, 07:38

    The filename of the RST is not matching the actual contents anymore.
  13. Oli Bartsch uploaded patch set 5 CR -1 V +1 10/06/26, 07:57

  14. core-ci voted on patch set 5 V -1 10/06/26, 08:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110200

  15. core-ci voted on patch set 5 V +1 10/06/26, 08:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110200

  16. Oli Bartsch commented on patch set 5 10/06/26, 08:27

    Reply

    Done
  17. Benni Mack voted on patch set 5 CR +1 V +1 10/07/26, 14:20

  18. Oli Bartsch uploaded patch set 6 CR +1 V +1 10/07/26, 20:32

  19. Wouter Wolters commented on patch set 6 CR +1 V +1 10/07/26, 20:39

    Tested in Media, and editing a page on the social media tab.
  20. Benni Mack voted on patch set 6 CR +1 V +1 10/07/26, 20:39

  21. core-ci voted on patch set 6 V +1 10/07/26, 20:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110409

  22. Oli Bartsch voted on patch set 6 CR +2 V +2 10/07/26, 21:01

  23. Oli Bartsch merged patch set 7 10/07/26, 21:01