[wp-trac] [WordPress Trac] #45633: finfo_file() returns text/plain for json file instead of application/json

WordPress Trac noreply at wordpress.org
Mon May 6 01:35:43 UTC 2019


#45633: finfo_file() returns text/plain for json file instead of application/json
--------------------------+-----------------------------
 Reporter:  tabrisrp      |       Owner:  joemcgill
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Future Release
Component:  Upload        |     Version:  5.0.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------

Comment (by photocurio):

 @joemcgill I added your `wp_check_filetype_and_ext` to my functions files
 but it did not allow me to upload JSON.  I've also tried filtering
 mime_types, and no luck.  Yet, if I go in and add JSON to the mime_types
 listed in the wp_includes/functions.php, I can upload JSON.  Strange!
 Naturally I won't leave the wordpress core hacked.  I sure wish these
 filters worked.

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


More information about the wp-trac mailing list