2

I'm using RoR and I have a base 64 encoded image image_base64 = "data:image/jpeg;base64,/9j/4AAQSkZ...".

An API asks me to upload it as JPG file in a multipart/form-data parameter - e.g curl -X POST -F "images_file=@my_image.jpg"

I know how to turn the base 64 image into a file that would be saved somewhere (like in this other SO question), but I don't really want to be saving and deleting files, just create one on the fly. How can I do that?

Community
  • 1
  • 1
Davor
  • 1,227
  • 4
  • 15
  • 31

0 Answers0