Opened 8 years ago
Last modified 23 months ago
#39553 new enhancement
Use REST API endpoints for Plupload backend
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Media | Keywords: | has-patch |
Focuses: | rest-api | Cc: |
Description
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
).
Attachments (1)
Change History (21)
#1
@
8 years ago
It'd be great if we could enable the Plupload chunking of larger files at the same time here - I know that dramatically increases the amount of work, but would be a welcome addition by many, and would be a good enough reason to break some of the BC concerns in the API IMHO.
#2
@
8 years ago
Chunking could work, but we need to work out how that looks in a REST context. (That is, design the endpoint first, then make Plupload work with it.) My concern would be that it's a use case that only the admin can use, which wouldn't be great, but if we can design it in an admin-agnostic way, I'm all for adding it.
#3
@
8 years ago
For reference, S3's API has multi-part support, however this is run a little differently.
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-media by rmccue. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-restapi by rmccue. View the logs.
8 years ago
#8
@
8 years ago
Split the chunked upload enhancement out to #40410; we should do it, but it shouldn't hold up the JS changes, which lay the groundwork for adding this later.
This ticket was mentioned in Slack in #core-restapi by rmccue. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
8 years ago
#11
@
8 years ago
- Milestone changed from 4.8 to Future Release
Punting based on feedback from @rmccue.
This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.
8 years ago
This ticket was mentioned in Slack in #core-media by spacedmonkey. View the logs.
5 years ago
This ticket was mentioned in PR #1316 on WordPress/wordpress-develop by spacedmonkey.
4 years ago
#15
Trac ticket: https://core.trac.wordpress.org/ticket/39553
This ticket was mentioned in Slack in #core-media by spacedmonkey. View the logs.
4 years ago
#17
@
4 years ago
- Milestone changed from Future Release to 5.9
Moving into 5.9 for consideration. This ticket will need a fresh review and testing to find any edge cases. Like the description of this issue states, it's a little suspicious that this fits so well, we need to be conscious of any backcompat issues that may come up.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 years ago
#19
@
3 years ago
- Milestone changed from 5.9 to Future Release
Considering the high risk of backcompat issues and remaining time before 5.9 (December release) it was discussed in the Media meeting that this should probably wait one more release.
Early POC at conversion