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

Show a warning when a disallowed filetype is dropped on a MediaUpload #9578

merged 6 commits into from Sep 3, 2018


None yet
2 participants

pento commented Sep 3, 2018


When trying to upload a disallowed filetype to a file block, or an unsupported filetype to a restricted block (eg, a zip file to an image block), there's no feedback saying why the upload failed.

This PR re-arranges the filetype checking a little, to ensure a message is triggered on the former case, and adds a new message for the latter. It also adds the filename to each warning, so the person uploading the files knows which files caused which warning.

Fixes #9467.

How has this been tested?

  • Upload a blocked file (eg, foo.exe) to a file block.
  • Upload an allowed, but unsupported file (eg, to an image block.


screenshot of the image block showing the error messages


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@pento pento added this to the 3.8 milestone Sep 3, 2018

@pento pento requested a review from WordPress/gutenberg-core Sep 3, 2018



@pento pento merged commit 375fdc0 into master Sep 3, 2018

2 checks passed

codecov/project 50.37% (+<.01%) compared to c9668e9
continuous-integration/travis-ci/pr The Travis CI build passed

@pento pento deleted the fix/9497-show-warning-for-disallowed-files branch Sep 3, 2018

@aduth aduth referenced this pull request Sep 6, 2018


Fix/9467 #9538

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment