[wp-trac] [WordPress Trac] #47987: REST API: Add handling of PHP fatal errors while resizing images after upload
WordPress Trac
noreply at wordpress.org
Fri Sep 27 18:41:46 UTC 2019
#47987: REST API: Add handling of PHP fatal errors while resizing images after
upload
-----------------------------+--------------------------------
Reporter: azaozz | Owner: TimothyBlynJacobs
Type: task (blessed) | Status: accepted
Priority: highest omg bbq | Milestone: 5.3
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-----------------------------+--------------------------------
Comment (by azaozz):
Replying to [comment:17 TimothyBlynJacobs]:
> I agree they are post processing, but then we still need the data from
the request object to make that happen. Or am I misunderstanding the
distinction.
I see what you mean. Yes it needs the data, but this "post meta" should
probably be saved as soon as the attachment post has been created, if it
exists at all at the time.
Generally outside the API, upload requests do not contain any of that post
meta. They only contain a file in the `$_FILES` array. I'm not sure how
this is supposed to be handled through the API or by the client, and why
there may be other data together with the file.
As far as I see all uploads are started by the user dropping a file in the
browser window or selecting a file from the OS dialog. In these cases no
additional data is sent together with the upload. Not sure where that data
is supposed to come from..?
Then, after the upload is complete, all the additional post meta is saved
with another request, when the user actually adds it.
But that's a question we can look at later...
> Cool, I'm on a plane for the rest of the day. Will hopefully have a
patch for review this Saturday.
Great! Thanks :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47987#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list