[wp-trac] [WordPress Trac] #39777: Upload of certain mime type buggy

WordPress Trac noreply at wordpress.org
Fri Feb 3 14:55:17 UTC 2017


#39777: Upload of certain mime type buggy
--------------------------+-----------------------------
 Reporter:  1manfactory   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.7.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I am using the following code to grand uploads for epub, pdf and mobi
 files inside my functions.php

 {{{#!php
 <?php
 function my_upload_mimes($mimes) {

         $mimes['epub'] = 'application/epub+zip';
         $mimes['mobi'] = 'application/octet-stream';
         $mimes['pdf'] = 'application/pdf';

     return $mimes;
 }
 add_filter('upload_mimes', 'my_upload_mimes');

 }}}

 It used to work until recently. All I get is the error message that I am
 not allowed to upload epub files.

 Funny thing is that it only happens with some epub files.

 It's not size related. I am having the same trouble on test and production
 environment.

 It seems to me that the way the included mimetype file inside the zip
 container is handled wrong

 Juergen

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39777>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list