Skip to content

[Dropzone] Allow for multiple file uploads at once#3684

Open
Dooij wants to merge 2 commits into
symfony:3.xfrom
Dooij:multiple-file-uploads
Open

[Dropzone] Allow for multiple file uploads at once#3684
Dooij wants to merge 2 commits into
symfony:3.xfrom
Dooij:multiple-file-uploads

Conversation

@Dooij

@Dooij Dooij commented Jun 19, 2026

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? yes
Issues Fix##7 Fix ##2567
License MIT

Adds proper multiple support to UX Dropzone.

A native <input type="file" multiple> replaces its selection on every pick and offers no way to remove a single file, so the Stimulus controller now owns the selection in a DataTransfer: it accumulates files across successive picks (files with the same name, size and updatedAt are seen as the same file and not added more than once), writes the result back to input.files so the form still submits everything, previews each file, and lets the user remove files individually.

Behavior is triggered by enabling the Typesmultiple option (from FileType).

Usage:

$builder->add('photos', DropzoneType::class, [
    'multiple' => true,
]);

A dropzone:remove event (the removed File in event.detail) has been added.

Tests: vitest (accumulate / dedupe / remove), a Playwright browser test using real setInputFiles, and a PHP render test for the multiple markup.

@carsonbot carsonbot added Bug Bug Fix Documentation Improvements or additions to documentation Feature New Feature Status: Needs Review Needs to be reviewed labels Jun 19, 2026
@carsonbot carsonbot changed the title Allow for multiple file uploads at once, and add tests Allow for multiple file uploads at once, and add tests Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Dropzone
controller.d.ts 688 B / 332 B 1.06 kB+58% 📈 / 459 B+38% 📈
controller.js 2.72 kB / 797 B 4.88 kB+80% 📈 / 1.28 kB+65% 📈
style.min.css 945 B / 471 B 1.52 kB+65% 📈 / 590 B+25% 📈

@Dooij Dooij changed the title Allow for multiple file uploads at once, and add tests [Dropzone] Allow for multiple file uploads at once Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix Documentation Improvements or additions to documentation Feature New Feature Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants