Opened 4 years ago
Last modified 3 years ago
#46775 new enhancement
Cannot allow multiple MIME for same file extension
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | 5.1 |
Component: | Upload | Keywords: | |
Focuses: | Cc: |
Description
Using 5.1.1, .zip are being detected as application/zip on my PC, but the same file (exact same) is being detected as application/x-zip-compressed on another PC. I've attempted to DISABLE_UNFILTERED_UPLOADS and temporarily removed the is_super_admin constraint from wp-includes/functions.php but still no luck. I also wasn't able to add this as an array without throwing a PHP exception.
This prevents me from allowing users to upload .zip from their PC. It's not appropriate for me to ask the user to make any changes to their PC.
Any advice?
Note: See
TracTickets for help on using
tickets.
Having debugged a problem with the File block ( https://github.com/WordPress/gutenberg/issues/23510 ) I searched and found the same issue as reported here.
My workaround was to use a different prefix for the mime type that some Windows browsers see.
I added the following line in wp_get_mime_types()
This resolved the problem for the File block.
The change does not seems to affect media upload.