mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
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
|
||
|---|---|---|
| .. | ||
| class-wp-rest-attachments-controller.php | ||
| class-wp-rest-autosaves-controller.php | ||
| class-wp-rest-block-renderer-controller.php | ||
| class-wp-rest-blocks-controller.php | ||
| class-wp-rest-comments-controller.php | ||
| class-wp-rest-controller.php | ||
| class-wp-rest-post-statuses-controller.php | ||
| class-wp-rest-post-types-controller.php | ||
| class-wp-rest-posts-controller.php | ||
| class-wp-rest-revisions-controller.php | ||
| class-wp-rest-search-controller.php | ||
| class-wp-rest-settings-controller.php | ||
| class-wp-rest-taxonomies-controller.php | ||
| class-wp-rest-terms-controller.php | ||
| class-wp-rest-themes-controller.php | ||
| class-wp-rest-users-controller.php | ||