Total Posts: 7
I got a problem when I tried to upload an image via web service. Everything runs smoothly and I get no error message, the image file (return value) is always /i/m/image.jpg BUT no image is really created (!!). I check on server folder and there is no file there, but the directory is created.
And if I use Admin Interface to upload image, everything runs perfectly. product is uploaded correctly. I think this is magento bug.
Here is my code
$image['file']['content'] = base64_encode(file_get_contents($path));
$image['file']['mime'] = 'image/jpeg';
$image['label'] = 'Front View';
$image['exclude'] = 0;
$image['types'] = array('image','small_image');
$image_file = $client->getResponse();
echo 'create image : ' . $sku . ' => ' . $image_file . "<br/>";
$image_file_data .= $sku . "," . $image_file;
echo 'create image failed: ' . $sku . ' => ' . $path . ' : ' . $client->getErrorMessage() . '<br/>';
Thanks for any of your attention