1

I am new to working with images in web development. We have a Node.js Express server that will run on Heroku and uses Cloudinary to store images.

Ideally we could save images directly to Cloudinary, but I am not sure if that's possible and we are afraid of putting our Cloudinary credentials on the client.

Assuming we must send images data to our server first instead of sending them directly to Cloudinary - if the images are encoded as base64 on the client, is it possible to stream the images from the client to the server - or must we send all the data at once? Either way, what headers do we use to send binary / base64 data?

is it possible to send or even stream binary data from the client to the server?

since it is a Node.js server, it would be ideal to use streams and to stream the file from our server to Cloudinary.

hope this makes sense, and info would be very helpful.

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

1 Answers1

2

Why not using direct uploads from the client side to Cloudinary using the jQuery plugin?

This method supports both signed or unsigned uploads, when the signature can (and should) be generated on your server before rendering the page, for privacy reasons. Uploading from Base64 URI is also possible with this mechanism.

Note that Cloudinary's client-libraries also wrap this plugin and provide you with "off the shelf" solutions for embedding the upload-fields in your web app, with the signature already inside.

Let us know if you need any further guidance.

Community
  • 1
  • 1
Nadav Ofir
  • 778
  • 4
  • 6