[wp-trac] [WordPress Trac] #50711: REST API, Media: Fix retrying of post-processing of edited images
WordPress Trac
noreply at wordpress.org
Tue Jul 21 02:29:54 UTC 2020
#50711: REST API, Media: Fix retrying of post-processing of edited images
--------------------------+-----------------------
Reporter: azaozz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
--------------------------+-----------------------
Comment (by azaozz):
Ideally it can be like 50711-extended.diff, the new attachment post is
created and the `X-WP-Upload-Attachment-ID` header is set before any edits
are applied to the image. Then it can retry on all possible failures.
However there are few caveats:
- Standard API errors cannot be HTTP 500 or they will trigger retries.
- Currently on the js side it can only retry to create image sub-sizes.
Would need to handle cases (repeat the request) if the server fails while
cropping or rotation the image.
Lets improve this in 5.6.
For now lets handle "server crashes" when creating the sub-sizes for the
edited image, see 50711.diff. This is the same as after uploading new
image. Can be committed now and it will start working after
https://github.com/WordPress/gutenberg/pull/24081 is fixed upstream.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50711#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list