[wp-trac] [WordPress Trac] #45615: CSV Mime Type fails upload
WordPress Trac
noreply at wordpress.org
Mon Jan 7 11:32:05 UTC 2019
#45615: CSV Mime Type fails upload
--------------------------------------+------------------------
Reporter: Kloon | Owner: joemcgill
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.0.3
Component: Upload | Version: 5.0.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------
Comment (by tellyworth):
attachment:45615.5.diff moves the unit tests for vtt to a separate
function, and adds tests for dfxp and json. Those types are unsupported by
default, but can be added by filtering `upload_mimes` - see
`test_wp_check_filetype_and_ext_unsupported_filtered()` for a trivial
example. I think this is the right approach for obscure file types that
don't need to be supported by core by default.
However, note that the test.dfxp and test.json cases currently fail their
filtered tests, meaning adding those types to `upload_mimes` via a filter
is not sufficient to allow them. We'd need either less strict logic or
specific exceptions for them in the text/plain block in
`wp_check_filetype_and_ext()`. I haven't found a simple solution.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45615#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list