cloudinary icon indicating copy to clipboard operation
cloudinary copied to clipboard

uploading base64

Open ghost opened this issue 10 years ago • 8 comments

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-

ghost avatar Mar 30 '15 03:03 ghost

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.

Lepozepo avatar Mar 30 '15 03:03 Lepozepo

This doesn't look too difficult to do now, I'll put it as a feature request for the next patch.

Lepozepo avatar Jul 21 '15 08:07 Lepozepo

Check out the new update! It's more efficient and flexible ^_^.

Lepozepo avatar Jul 21 '15 08:07 Lepozepo

@Lepozepo Examples please? ^_^

Secretmapper avatar Jul 25 '15 11:07 Secretmapper

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.

Secretmapper avatar Jul 27 '15 02:07 Secretmapper

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 !

Lepozepo avatar Jul 27 '15 04:07 Lepozepo

Thanks, this helped!

atulmy avatar Jan 26 '16 20:01 atulmy

@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

1ns1d3r avatar Jun 05 '16 20:06 1ns1d3r