Skip to content

Instantly share code, notes, and snippets.

@steveclarke
Created March 30, 2012 12:00
Show Gist options
  • Save steveclarke/2251066 to your computer and use it in GitHub Desktop.
Save steveclarke/2251066 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'net/http'·
sourcefile = "http://s3.amazonaws.com/*redacted*/old_site_product_images/product1.jpg"
open(sourcefile) do |f|
puts File.basename(f)
end
# outputs: open-uri20120330-58981-1mny2cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment