[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 19:49:41 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:134 jbalyo]:
> FYI, I'm still experiencing this issue in WP 4.7.3 when attempting to
upload OGV (OGG Video) files.
Are you comfortable enough with PHP to try and run a quickie test?
If so, take the code below and save it to the root of your WordPress
installation (same folder as `wp-load.php`), call it `test.php` or
something:
{{{#!php
<?php
require_once('wp-load.php');
header("Content-type: text/plain");
//This should point to an actual ogg file.
$ogfile = 'test.ogv';
try {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$real_mime = finfo_file($finfo, $ogfile);
finfo_close($finfo);
echo "MIME: $real_mime";
} catch(Exception $e){
echo 'Could not use fileinfo.';
}
}}}
This tiny script is expecting an OGV file called `test.ogv` in that same
directory. I recommend using FTP to upload a copy of the OGV you were
unable to upload through WordPress (renamed thusly).
Once the `test.php` and `test.ogv` are in place, visit
http://yourdomain.com/test.php in a web browser. What does it output? On
my server, I see: `MIME: video/ogg`
(After you've gotten a response, feel free to delete the test files.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39550#comment:135>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list