Bemasoft Posted June 15, 2011 Share Posted June 15, 2011 Please, could anyone explain me how to upload an image using webservice?I'm able to create, edit and delete products but I can't figure out how to upload images and linking them to a concrete product.Thank you so much. Link to comment Share on other sites More sharing options...
damien13 Posted July 7, 2011 Share Posted July 7, 2011 Hi,I have the same problem, I can’t figure out how to upload images using webservices.Any ideas ?Thank you ! Link to comment Share on other sites More sharing options...
Bemasoft Posted July 7, 2011 Author Share Posted July 7, 2011 Hi damien13,Yes, I've solved it and I posted it in other thread but in spanish. If you don't speak spanish, I can try to translate it for you.Thank you. 2 Link to comment Share on other sites More sharing options...
damien13 Posted July 7, 2011 Share Posted July 7, 2011 Hi Bemasoft,Thanks for your reply.I checked your post (translated by Google ;-)).I have a question about it.If I use CURL to generate the request (like with the Webservice CRUD tutorial), where must I put the content of the image.I've added CURLOPT_POSTFIELDS => 'name="image"&filename;="50.jpg"', used the url 'images/products/9' for an existing product id,but I can't found how to add the content to the request.I get the content with PHP like this : $image = file_get_contents('50.jpg'); Muchas gracias. ;-)Damien Link to comment Share on other sites More sharing options...
damien13 Posted July 7, 2011 Share Posted July 7, 2011 Hi, I think I've figured it out.I put this in the CURL request and it works : CURLOPT_POSTFIELDS => array('image' => '@'.$image.';type=image/jpeg') where $image is this absolute path to the image.Thanks for your help.PS : maybe you could mark this topic as solved.Damien Link to comment Share on other sites More sharing options...
roland_d_alsace Posted March 21, 2012 Share Posted March 21, 2012 Hi. This topic is old sure, but there are not a lot of with this subject. Do you know how can i have the picture id after uploading. Prestashop send one more time the picture in response after uploding (1.4.7) and nothing else (no xml). Thanks. Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now