[wp-trac] [WordPress Trac] #39550: Some Non-image files fail to upload after 4.7.1
WordPress Trac
noreply at wordpress.org
Tue Mar 7 20:20:10 UTC 2017
#39550: Some Non-image files fail to upload after 4.7.1
---------------------------+------------------------
Reporter: greatislander | Owner: joemcgill
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.7.3
Component: Upload | Version: 4.7.1
Severity: critical | Resolution: fixed
Keywords: fixed-major | Focuses:
---------------------------+------------------------
Comment (by blobfolio):
Replying to [comment:136 jbalyo]:
> Hello blobfolio - no problem running the test here, I received this
output:
>
> {{{
> MIME: application/ogg
> }}}
Out of curiosity, do you get the same output if you use this file instead?
http://techslides.com/demos/sample-videos/small.ogv
> Same output whether or not the temporary "Disable Real MIME Check"
plugin is activated.
The trouble (at least with the native upload) is `application/ogg` isn't a
valid MIME type for an OGV file. It is, however, valid for OGX files.
WordPress is expecting `video/ogg`, and since `application/ogg` presumably
isn't in your whitelist, it is being rejected. If the OGV example above is
interpreted correctly, then it might just be that this one particular file
is misnamed.
If you have a custom theme on your site, adding the following to its
`functions.php` should fix it:
{{{#!php
function ogx_upload_mimes( $existing_mimes = array() ) {
$existing_mimes['ogx'] = 'application/ogg';
$existing_mimes['ogv'] = 'video/ogg';
return $existing_mimes;
}
add_filter( 'upload_mimes', 'ogx_upload_mimes' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39550#comment:137>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list