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

WordPress Trac noreply at wordpress.org
Wed Jan 8 12:17:36 UTC 2020


#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 needle):

 Replying to [comment:11 photocurio]:
 > @joemcgill I added your `wp_check_filetype_and_ext` to my functions
 files but it did not allow me to upload JSON.

 On my system, the reported mime-type is `text/html`. Add that to the array
 that `$real_mime` is checked against.

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


More information about the wp-trac mailing list