Open ghost opened 9 years ago
You can't, I need to upgrade this package to work the way my S3 package is working, I can probably get base64 working then. Hope to make changes within the coming couple of weeks.
This doesn't look too difficult to do now, I'll put it as a feature request for the next patch.
Check out the new update! It's more efficient and flexible ^_^.
@Lepozepo Examples please? ^_^
To anyone who wants an example:
Cloudinary._upload_file("base64", {}, callback);
Basically, Cloudinary.upload
reads image files as base64, and passes it to _upload_file
, so you can just directly pass the base64 data to internal method and it will work.
Wow, that works? That's pretty sweet, I didn't even know, lol. I only just had a look at their docs again though and it makes sense that it would since they accept the incoming signal as a base64 string. I'll patch up the code when I get a chance to make it a little more obvious and I'll add it to the docs. Thanks for the insight @Secretmapper !
Thanks, this helped!
@Lepozepo this enhancement don't works anymore for me in version 4.1.6, but when I just downgraded to version 4.1.3 it works fine again, do you know why?
I got the following error in browser's console:
Exception in delivering result of invoking 'c.sign': TypeError: Cannot set property '_id' of undefined
How can you upload a base64?
http://support.cloudinary.com/hc/en-us/articles/202519992-How-to-upload-a-Base64-DataURI-string-of-an-image-directly-from-the-browser-