- Notifications
You must be signed in to change notification settings - Fork 4.6k
Add Upload button to experimental media modal and always allow multiple uploads #73125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
| Size Change: +185 B (+0.01%) Total Size: 2.41 MB
ℹ️ View Unchanged
|
| The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| Flaky tests detected in f728de0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19251181657
|
d8ded50 to a1ff8e0 Compare
ramonjd left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Buttons works!
✅ I can upload one or multiple images using the file selector or by dragging and dropping
LGTM
Thanks for updating!
| const filesArray = Array.from( files ); | ||
| handleUpload( { | ||
| allowedTypes, | ||
| filesList: filesArray, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, for another PR if you want. Looks like onUpload and uploadMedia both support onError - just thinking for when folks try to upload videos or other non-allowed files.
| I looked at the static lint error but all I could see in the logs was No idea what it's complaining about. I kicked it off again 🤞🏻 |
| Thanks for reviewing @ramonjd ! Yeah I don't know what's wrong with the linter. It has been failing consistently on all runs, even after a rebase 🤷 |
Good spotting! |
| Oh nice, thanks Andy! Lol that all our automated tools and GH AI helper were utterly useless at identifying the actual problem. |
| @fcoveram have you tried testing on the latest trunk? The multi-upload issue should be fixed and the upload button should be in place. |
| I was trying from a testing site I have, but I tried in the PR runner and everything works correctly ✨ Sorry the confusion. |


What?
Starts addressing #73085.
Adds an "upload media" button to the media modal, and also adjusts the Dropzone logic to always allow dropping multiple files regardless of the modal's
multipleproperty.Testing Instructions