Changes between Initial Version and Version 1 of Ticket #24156
- Timestamp:
- 04/22/2013 05:40:41 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24156 – Description
initial v1 1 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, '&' );) 1 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: 2 {{{ 3 $r['body'] = http_build_query( $r['body'], null, '&' ); 4 }}} 2 5 3 6 And curl wants array to send file boundary to rest api , in that case it fails. 4 7 ex. 5 8 {{{ 6 9 $headers['Content-type'] = 'multipart/form-data'; 7 10 $args['file'] = '@/pathtofile'; 8 11 $request = new WP_Http; 9 $result = $request- >request($url,$args);10 12 $result = $request->request($url,$args); 13 }}} 11 14 Let me know if you have questions