If you submit file through wp curl it doesnt send boundary params for file mutlipart — at Version 1
|Reported by:||samnani||Owned by:|
Description (last modified by SergeyBiryukov)
If you submit file through wp curl it doesnt send boundary params for file multipart, because in class-http.php at line 174 $r['body'] array is converted to string:
$r['body'] = http_build_query( $r['body'], null, '&' );
And curl wants array to send file boundary to rest api , in that case it fails.
$headers['Content-type'] = 'multipart/form-data'; $args['file'] = '@/pathtofile'; $request = new WP_Http; $result = $request->request($url,$args);
Let me know if you have questions