Skip to content

Instantly share code, notes, and snippets.

@softwaregravy
Created January 26, 2011 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softwaregravy/797407 to your computer and use it in GitHub Desktop.
Save softwaregravy/797407 to your computer and use it in GitHub Desktop.
Getting an image into Base64
http_client = HTTPClient.new
image = http_client.get_content 'https://s3.amazonaws.com/relusions/ads/restaurant/rectangle_restaurant3-30.jpg'
base64_image = Base64.encode64 image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment