[wp-trac] [WordPress Trac] #49483: 'Upload file types' Setting field for multisite network settings should be textarea than text input

WordPress Trac noreply at wordpress.org
Fri Feb 21 06:25:34 UTC 2020


#49483: 'Upload file types' Setting field for multisite network settings should be
textarea than text input
---------------------------------------+------------------------------
 Reporter:  shamalisulakhe             |       Owner:  (none)
     Type:  enhancement                |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Administration             |     Version:  5.3.2
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:  ui, multisite
---------------------------------------+------------------------------

Comment (by shamalisulakhe):

 @johnjamesjacoby

 **I have noticed a few more things -**
 1. If the filetypes are entered in upper case characters (such as ''ODT,
 WebM'' instead of odt, webm), they are not recognized and therefore
 allowed for media uploads.
 2. The user may enter the filetype in the form of an extension (such as
 ''.jpg'' instead of jpg), they are also not allowed.

 In such cases, we should convert the filetypes to lowercases and remove
 periods(.) before saving them to site options. I have added these
 conversions in the revised patch-2.

 **Another concern is that -**

 I have added these modified conversion and parsing functionality in the
 function ''check_upload_mimes()'', which is the only function in WP core
 where the site option ''upload_filetypes'' is fetched.
 Thus, it is expected that the third-party plugins and themes use
 ''check_upload_mimes()'' function, instead of fetching the site option
 ''upload_filetypes'' directly in their code.

 Revised patch - upload_filetypes-textarea-49483-2.diff

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


More information about the wp-trac mailing list