[wp-trac] [WordPress Trac] #47987: REST API: Add handling of PHP fatal errors while resizing images after upload
WordPress Trac
noreply at wordpress.org
Sun Oct 13 18:04:39 UTC 2019
#47987: REST API: Add handling of PHP fatal errors while resizing images after
upload
-----------------------------+--------------------------------
Reporter: azaozz | Owner: TimothyBlynJacobs
Type: task (blessed) | Status: reopened
Priority: highest omg bbq | Milestone: 5.3
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
-----------------------------+--------------------------------
Changes (by azaozz):
* status: closed => reopened
* resolution: fixed =>
Comment:
Reopening to reevaluate the need for the `create-image-subsizes` action in
`post_process_item()`.
This came up during implementing use of the end-point in
https://github.com/WordPress/gutenberg/pull/17858. The purpose of the new
end-point is allow post-processing of an uploaded file to continue after a
fatal error. At this point the server "knows" what needs to be done, there
is no point in limiting the action.
The code there can be changed to test if the attachment is an image and if
any sub-sizes are missing, then create the sub-sizes if necessary. In the
future if post-processing is implemented for other file types, that can be
added as well.
That'd be the same logic as in the current `switch ( $request['action'] )`
but instead of expecting the client to "know" the action, the server will
determine it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47987#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list