Sometimes the cloudinary API uploader throws an error trying to upload base64 svg...
Hello! I know that to upload the base64 image I need to use this format
data:image/svg+xml;base64,PHN... but sometimes it doesn't work, could you help me?
This image works fine: `first.txt`
I used these options
folder: 'contracts/0x0747118c9f44c7a23365b2476dcd05e03114c747'
overwrite:true
public_id:'0x0747118c9f44c7a23365b2476dcd05e03114c747_1942'
But it throws an error: 'Resource is invalid' for `failed.txt`
And I'm not sure why, please help!
Best Answer
-
Hi @Dmytro123 ,
Thanks for reaching out.
It looks like the base64 data is for SVG files and the second one fails because it has more than 1000 tags.
If you'd like, I can enable a setting in your account to allow SVG uploads that contain more than 1k tags so just let me know.
Thomas
1
Answers
-
Hey Thomas, yes sure! We definitely need that! Thanks
0 -
Hi Dmytri,
You will soon receive another mail from Cloudinary asking some questions about the account and then we can go ahead and change the flag.
Lookout for an email from Support at Cloudinary.
Regards,
AkshayHelpful Links For You
💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
🧑🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
📰 Check out the Cloudinary blog for the latest company news and insights0 -
Hi there,
The setting that Thomas mentioned has been enabled for your account, so you should be able to proceed now. Please give your upload another try and let us know how it goes. Of course, if you have any questions at all, do not hesitate to ask.
Kind regards,
Tia
Helpful Links For You
💬 Share questions, connect with other users in our Cloudinary Community forums and Discord server!
🧑🎓 Join our Cloudinary Academy for free courses, workshops and other educational resources.
📄 Read our documentation for in-depth details on Cloudinary product features and capabilities
📰 Check out the Cloudinary blog for the latest company news and insights0