WordPress/wp-includes/rest-api
Andrew Ozz 67b2ff7bc3 REST API: Add support for continuing the post-processing of images after upload. Flow:
1. `POST /wp/v2/media`.
2. If the upload failed (HTTP 500 error), look for a response header with `X-WP-Upload-Attachment-ID` header that contains the newly created attachment ID.
3. `POST /wp/v2/media/{id}/post-process` with `{ "action": "create-image-subsizes" }`. This request may still fail, but it will save its progress.
4. On continued failure, `DELETE /wp/v2/media/{id}` to give up on the upload and instruct the user to resize their image before uploading.

Props TimothyBlynJacobs.
Fixes #47987.
Built from https://develop.svn.wordpress.org/trunk@46422


git-svn-id: http://core.svn.wordpress.org/trunk@46220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-07 17:06:03 +00:00
..
endpoints REST API: Add support for continuing the post-processing of images after upload. Flow: 2019-10-07 17:06:03 +00:00
fields REST API: Combine array and object cases in WP_REST_Meta_Fields::get_default_for_type() to remove duplicated line. 2019-09-29 22:34:57 +00:00
search Docs: Add missing @see tag to WP_REST_Post_Search_Handler DocBlock. 2019-05-14 15:00:07 +00:00
class-wp-rest-request.php REST API: Pass "null" as the post date property to reset post to initial "floating" date value. 2019-09-23 17:25:57 +00:00
class-wp-rest-response.php Docs: Remove extra spaces in various REST API DocBlocks. 2019-09-05 23:05:55 +00:00
class-wp-rest-server.php Code Modernization: Remove JSON extension workarounds for PHP < 5.6. 2019-09-20 20:08:57 +00:00