Review main Merged

96300[FEATURE] Upload files in the file browser via drop and paste

Oli Bartsch CR +2 V +2 Normal +193 −38 updated 10/08/26, 06:28

Commit message

The file browser, opened for example with "Add image" in a file field,
now uses the drag uploader instead of the classic upload form. Files can
be uploaded to the folder shown with the upload button, by dropping them
onto the browser and by pasting them from the clipboard. The allowed
file extensions of the field and the user TSconfig option
options.folderTree.uploadFieldsInLinkBrowser still apply.

As in the Media module, the dropzone is shown as an overlay covering the
content area of the browser, so files can be dropped anywhere onto it.
The dropzone only opens while a file is dragged over the content area
and closes again when the file leaves it for the folder tree, as
dropping a file onto a folder there would suggest uploading it to that
folder. For this, the file browser sets the data-dropzone-area attribute
of the drag uploader to its content area.

After the upload, the folder is reloaded, so the uploaded files can be
selected right away.

Folders of the file browser are loaded without reloading the page, which
replaces the uploader. A replaced uploader now ignores pastes, otherwise
files would end up in the previously shown folder.

The changelog entry of the Media module feature is extended instead of
adding another one for the same feature.

Review

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

Issues 2

Files 12

Review log 1824

  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:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109890

  3. Simon Schaufelberger commented on patch set 1 10/02/26, 09:00

    I've tested this feature and need to say thank you first of all! This is a huge UX improvement! When i drag a file into the file browser, the Drag&Drop bar appears which would assume that i can drop the file now wherever I want but that doesn't work. Instead i can only drop the file directly into the small bar. Can you please change it so that i can drop the file in the whole "content" area with the gray background? That would be perfect!
  4. Oli Bartsch uploaded patch set 2 V +1 10/02/26, 09:34

  5. Oli Bartsch commented on patch set 2 10/02/26, 09:37

    Reply

    Thanks a lot for testing and the feedback! I changed this accordingly. - Files can now be dropped anywhere onto the content area of the file browser, not only onto the dropzone bar. While a file is dragged over that area, the bar is highlighted to show that dropping will upload it. - The folder tree is excluded on purpose: dropping a file onto a folder there would suggest uploading it into that folder, while the upload always goes to the folder currently shown.
  6. core-ci voted on patch set 2 V +1 10/02/26, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109896

  7. Simon Schaufelberger commented on patch set 2 10/02/26, 09:44

    Reply

    would it be possible to show the drag&drop bar as a modal layer with a dimmed background the same way as the media module instead? then they would look identical.
  8. Oli Bartsch uploaded patch set 3 V +1 10/02/26, 10:10

  9. Oli Bartsch commented on patch set 3 10/02/26, 10:11

    Reply

    👍
  10. core-ci voted on patch set 3 V +1 10/02/26, 10:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109902

  11. Simon Schaufelberger commented on patch set 3 10/02/26, 14:29

    Reply

    great already! One more thing to be perfect is to remove the overlay again when you move your mouse out of the drop zone exactly like the media module. Then I'm happy.
  12. Simon Schaufelberger commented on patch set 3 10/02/26, 14:32

    Reply

    would it also be possible to only show the overlay when you move your mouse over the content area but not over the folder tree as you can't drop something over there (which is fine)?
  13. Oli Bartsch uploaded patch set 4 V +1 10/05/26, 09:42

  14. core-ci voted on patch set 4 V +1 10/05/26, 09:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110085

  15. Oli Bartsch commented on patch set 4 10/05/26, 10:04

    Reply

    Done
  16. Simon Schaufelberger commented on patch set 4 CR +1 V +1 10/05/26, 23:19

    works like a charm! Thank you so much for this huge improvement!
  17. Oli Bartsch uploaded patch set 5 CR +1 V +1 10/07/26, 20:37

  18. core-ci voted on patch set 5 V +1 10/07/26, 20:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110410

  19. Oli Bartsch uploaded patch set 6 V +1 10/07/26, 21:07

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

  21. Benni Mack voted on patch set 6 CR +1 V +1 10/07/26, 21:32

  22. Simon Schaufelberger voted on patch set 6 CR +1 V +1 10/07/26, 23:01

  23. Oli Bartsch voted on patch set 6 CR +2 V +2 10/08/26, 06:28

  24. Oli Bartsch merged patch set 7 10/08/26, 06:28