I've being searching around but can't find any info on how to use api to upload product images.
The best that I can find is to update the details for main_pair or image_pairs.
main_pair: {
detailed: {
http_image_path:"http://xxx.jpg",
https_image_path: "xxx.jpg",
}
}
But there is no mention of how to upload a new image and assign to the product.
From the vendor.php page, whenever we select a new image, it make a ajax call to this page
https://.../vendor.php?dispatch=image.upload
local_data: {name: "xxx.jpg", type: "image/jpg", path: "sess_data/xxxx.jpg", error: 0, size: 24561}
But if I do the ajax call from another page, it is show Access denied: Possible CSRF attack.
Please assist to provide more info on how to upload product images. Thanks.