[wp-trac] [WordPress Trac] #39550: Some Non-image files fail to upload after 4.7.1

WordPress Trac noreply at wordpress.org
Thu Feb 23 17:03:43 UTC 2017


#39550: Some Non-image files fail to upload after 4.7.1
------------------------------------+------------------------
 Reporter:  greatislander           |       Owner:  joemcgill
     Type:  defect (bug)            |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.7.3
Component:  Upload                  |     Version:  4.7.1
 Severity:  critical                |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------

Comment (by blobfolio):

 Replying to [comment:108 kontur]:
 > Yes, I understand. At any rate, this bug pretty much renders a plugin of
 mine useless, since it is centred around uploading and displaying
 webfonts, all of which, I think, require that the accepted mime type gets
 augmented, and then successfully passes this check - which currently it
 doesn't, or seemingly only sporadic on some installations.

 You could add a filter to your plugin to specifically bypass the issue
 only for font files, either re-implementing a looser `finfo` check (but
 again for font files I don't expect that will work consistently), or just
 rebuilding the ext/type data by passing the original filename back through
 `wp_check_filetype`. Take a look at this function for inspiration:
 https://github.com/Blobfolio/blob-common/blob/master/wp/functions-
 behavior.php#L31  Obviously all the class stuff is a bit out of scope for
 your needs, but if you remove 75% of it you should have what you need.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39550#comment:110>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list