[wp-trac] [WordPress Trac] #60835: Fix and improve handling of uploading of font files

WordPress Trac noreply at wordpress.org
Fri Jul 12 07:29:46 UTC 2024


#60835: Fix and improve handling of uploading of font files
----------------------------------------------------+---------------------
 Reporter:  azaozz                                  |       Owner:  (none)
     Type:  defect (bug)                            |      Status:  new
 Priority:  high                                    |   Milestone:  6.7
Component:  Upload                                  |     Version:  6.5
 Severity:  normal                                  |  Resolution:
 Keywords:  needs-testing has-patch has-unit-tests  |     Focuses:
----------------------------------------------------+---------------------

Comment (by youknowriad):

 Thanks @peterwilsoncc

 I had a discussion with Peter and wanted to share my take aways at the
 moment.

  - The PR doesn't not allow font uploads to bypass the `uploads_dir`
 filter.
  - The PR doesn't not allow other regular uploads to bypass the
 `uploads_dir` filter.
  - Plugin authors can use the new `upload_dir` argument to upload files to
 any location of their choosing without relying on the `uploads_dir`
 filter.
  - Plugin authors can already do the same thing today, but they don't have
 a low-level provided API for it. They can either choose to use their own
 upload function, a composer package or also use the existing `upload_dir`
 to do so.

 So to summarize, it seems the crux of the disagreement is whether we think
 that opening an API for plugins to upload files to a folder of their
 choosing knowing that they can already do it (in a a less straightforward
 way) is a big enough downside compared to the code quality improvement and
 maintainability offered by the change in the PR.

 My opinion is still the same, I think the PR is worth it and the downside
 is not big enough to prevent it from landing. I can understand that folks
 may feel otherwise though.

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


More information about the wp-trac mailing list