Upload Image URI to Cloudinary

I looked at the Cloudinary API and downloaded examples for NodeJS and it looks like the server uploads are using the file path. Meanwhile, client side loading requires an interface input tag. I already have an interface for users to select and crop a picture to their liking, and this gives me the data URI. I would like to save this file to Cloudinary without using the inline interface. Is it possible? This would basically mean that I could call some kind of upload function that can take a URI or blob file.

+3


source to share


1 answer


Cloudmin supports file uploads using data-encoded string and URI. Please make sure you submit your content as a data URI as described here: http://en.wikipedia.org/wiki/Data_URI_scheme .

For example, in Node.js:



cloudinary.uploader.upload ("data: images / GIF; base64, R0lGODlhAQABAIAAAAAAAP /// yH5BAEAAAAALAAAAAAABAAEAAAIBRAA7", function (result) {console.log (result)});

+6


source







All Articles