Unable to upload an image to cloudinary through programmatic api upload
dongqtm
Member Posts: 4 ✭
Hi!
I have been able to upload images through cloudinary upload api. However there is one image that keep giving me "Invalid image file" and I am trying to figure out why. It is a GIF file so it should be a valid image, and I do set "resource_type: image".
You can download the image from here
https://arweave.net/AGEG8d9MD-aKUFuv9P_ru39Eva8S_4hsLEF3NSpC804
The code I use to upload is
return new Promise((resolve: any, reject: any) => { cloudinary.uploader.upload(file, { resource_type: "auto"}).then(async (result) => { if (result.secure_url) { resolve(file) } }).catch((error) => { reject(error) }) })
Any help would be very appreciated. Thank you so much
Tagged:
0
Answers
-
I've closed this post as it's a duplicated question.
0
This discussion has been closed.