Conversation
|
@darylldoyle thanks for the PR! Could you please fill out the PR template with description, changelog, and credits information so that we can properly review and merge this? |
dkotter
left a comment
There was a problem hiding this comment.
So this doesn't work for me, I always get the Sorry, you are not allowed to upload this file type error message.
I think what's happening is there's an earlier mime check that fires before the wp_handle_upload_prefilter filter and since we aren't adding the svg mime until that filter runs, things no longer work.
To test, I'm in the Media Library admin page, with the Grid View on. If I drag and drop an svg image, I get the above error.
|
I was curious on how our E2E tests were passing here when I couldn't get things to work. Looking into that, the |
|
Thanks for flagging @dkotter! I too could replicate on the media grid view. I've resolved this and added additional tests for that. I also had to allow uploads from a few additional contexts, because otherwise you could only upload SVGs from the media pages. We might want to add some additional tests for these, but I don't have time at the moment. |
Description of the Change
Updates the plugin to only add SVGs as an allowed type, when the sanitiser will be able to run on those files.
How to test the Change
Changelog Entry
Credits
Props @username, @username2, ...
Checklist: