![]() |
Hi,
I am trying to upload images via and API using CI CURL Request class. However, Codeigniter errors "CodeIgniter\HTTP\Exceptions\HTTPException 22 : The requested URL returned error: 400" referring to line 'file=>$myfile' PHP Code: $image = \Config\Services::image(); Above throw the HTTP errors!! However, using native curl with CI \CURLfile (at bottom) I do not get the error. PHP Code: $myfile = new \CURLFile($image_view_path); PHP Code: foreach($imagefiles['images'] as $img) { Above is successful. Any help would be appreciated.
Try
PHP Code: $client->post('API ENDPOINT', [ See https://www.codeigniter.com/user_guide/l...#multipart
(07-30-2024, 07:55 PM)kenjis Wrote: Try Thank you so much. Works like a dream |
Welcome Guest, Not a member yet? Register Sign In |