[wp-trac] [WordPress Trac] #41608: Post files using cURL
WordPress Trac
noreply at wordpress.org
Fri Aug 11 07:18:19 UTC 2017
#41608: Post files using cURL
--------------------------+------------------------------
Reporter: codealfa | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 4.8.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by codealfa):
A possible fix could be to simply add the post value to the
CURLOPT_POSTFIELDS option without converting it to a string if the value
is an array and the ''Content-Type'' header has been given as ''multipart
/form-data''. According to the PHP manual, this ''Content-Type'' header
will be set if the post value is an array.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41608#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list