[wp-trac] [WordPress Trac] #40101: Cannot upload WOFF files

WordPress Trac noreply at wordpress.org
Fri Mar 10 22:15:18 UTC 2017


#40101: Cannot upload WOFF files
--------------------------+--------------------
 Reporter:  eddiemcham    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7.4
Component:  Upload        |     Version:  4.7.3
 Severity:  blocker       |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by lukecavanagh):

 @eddiemcham

 Try application/font-woff instead of application/x-font-woff.

 {{{#!php
 <?php
 add_filter('upload_mimes','add_custom_mime_types');
         function add_custom_mime_types($mimes){
                 return array_merge($mimes,array (
                         'woff' => 'font-woff',
                 ));
         }
 }}}

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


More information about the wp-trac mailing list