[wp-trac] [WordPress Trac] #43751: REST API: Attachments controller should respect "Max upload file size" and "Site upload space" in multisite

WordPress Trac noreply at wordpress.org
Tue Jul 10 12:50:56 UTC 2018


#43751: REST API: Attachments controller should respect "Max upload file size" and
"Site upload space" in multisite
--------------------------------------+----------------------------------
 Reporter:  danielbachhuber           |       Owner:  pento
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.9.8
Component:  Media                     |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  multisite, rest-api
--------------------------------------+----------------------------------
Changes (by danielbachhuber):

 * owner:  (none) => pento
 * status:  new => assigned
 * milestone:  5.0 => 4.9.8


Comment:

 Thanks for your work on this, @flixos90.

 In `43751.2.diff`, I've:

 * Internalized `check_upload_size()` to `WP_REST_Attachments_Controller`
 so we can avoid the legacy code paths.
 * Updated `WP_REST_Attachments_Controller->check_upload_size()` to return
 descriptive `WP_Error` objects instead of monkeying about with the
 `$files` data.
 * Updated the unit tests accordingly.

 I think it'd be great to land this in 4.9.8.

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


More information about the wp-trac mailing list