0

I'm searching for a way to download an URL with an image as binary so I can BASE64 Encode it and send it to my SAP Database. All this using RAILS.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
FastSolutions
  • 1,809
  • 1
  • 25
  • 49

1 Answers1

0

After I tried different things, I think the Curb gem is the best solution. This gem is found here: Ruby Gems Curb

It was easy to use like this:

curl_profile_pic = Curl::Easy.perform("example.url.jpeg)
params["personal_info"]["profile_pic"] = Base64.encode64(curl_profile_pic.body_str)
FastSolutions
  • 1,809
  • 1
  • 25
  • 49