WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 2 years ago

#28205 new enhancement

XMLRPC should probably expose Sideloading of images for shared hosts.

Reported by: georgestephanis Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.6
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

Useful for hosts with small MAX_POST_SIZE configurations.

Example of usage:

https://gist.github.com/georgestephanis/d38e7d855e9bb6c7b98e

Attachments (1)

28205.diff (3.2 KB) - added by georgestephanis 4 years ago.

Download all attachments as: .zip

Change History (5)

#1 @redsweater
4 years ago

I love the idea of working around the problem of WordPress's API falling over easily on large media uploads. But I wonder if the better solution would be to provide some mechanism through which clients could POST raw binary data, akin to what happens when a user uploads media through the wp-admin interface.

I know that uploading binary data is not possible in the pure XMLRPC interface, but some kind of well-defined mechanism for POSTing binary seems like a better long-term solution than relying upon uploading the data to a separate location only to be "sideloaded" into WordPress.

What if there were a WordPress XMLRPC API that vended a binary POST URL for more efficient uploads? Something like "wp.uploadBinaryFile" which could yield a one-time URL suitable for POST-ing the desired binary data. The URL could be pre-configured with some kind of session data that assured its security and also connected it to the provisional file being uploaded.

From my perspective it would be great to be able to tell WordPress, via the XMLRPC API, that I have a file to upload, and here's all the metadata about it (typical arguments to wp.uploadFile), but the data itself will be coming in a subsequent POST to a specific URL.

#2 @maxcutler
4 years ago

Related to #21497 which had a patch that needs some review/investigation.

#3 @nacin
3 years ago

  • Version changed from trunk to 2.6

#4 @wonderboymusic
2 years ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.