[wp-trac] [WordPress Trac] #39553: Use REST API endpoints for Plupload backend
WordPress Trac
noreply at wordpress.org
Thu Jan 12 01:34:34 UTC 2017
#39553: Use REST API endpoints for Plupload backend
-------------------------+-----------------------
Reporter: rmccue | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Media | Version: 4.7
Severity: normal | Keywords: has-patch
Focuses: rest-api |
-------------------------+-----------------------
`async-upload.php` currently handles all our backend uploading needs.
However, with the new `POST /wp/v2/media` endpoint in the REST API, we no
longer need a specialised API.
I had a quick (30 min) go at converting this, and it actually worked out
pretty well, which is crazy. There are sure to be a tonne of backwards
compatibility concerns to tackle here (especially around the custom
parameters that can be passed along), but I'm confident we can tackle
them.
Working proof-of-concept patch attached. This changes both the Media
Library uploader (`wp-plupload.js`) and `media-new.php`
(`media_upload_form`/`plupload/handlers.js`).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39553>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list