[wp-trac] [WordPress Trac] #53167: upload_filetypes should map to get_allowed_mime_types

WordPress Trac noreply at wordpress.org
Wed Jun 5 17:18:32 UTC 2024


#53167: upload_filetypes should map to get_allowed_mime_types
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.6
Component:  Networks and Sites                   |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing-info has-    |     Focuses:  multisite,
  unit-tests commit                              |  performance
-------------------------------------------------+-------------------------

Comment (by joemcgill):

 One thing that I was curious about when looking at this patch is whether
 there was a reason that the default mime types allowed for multisite was
 chosen for a good reason. Looking back at #24434, which is an early
 example of updating this list, the sentiment by Core devs at the time was
 that the list seemed somewhat arbitrary, so I think that pulling this list
 from `get_allowed_mime_types` makes sense.

 I'll also note that this will only affect newly created networks, since
 this is only used to populate the schema for new networks, not change the
 allowed mime types for existing networks. To do so, a network admin would
 need to updated the list of allowed upload file types in `/wp-
 admin/network/settings.php`, which updates the `upload_filetypes` option
 for the site. I confirmed that applying this PR to an existing site does
 not change the set of allowed file types.

 I think this makes sense and makes maintenance of this list much less
 manual.

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


More information about the wp-trac mailing list