Reputation: 2258
Is there a way to have something like this:
File.new('http://hostname/myfile.zip')
inside a controller?
Upvotes: 0
Views: 1609
Reputation: 13383
require 'open-uri'
file = open(URI.parse('http://www.google.com/intl/en_ALL/images/logo2.gif'))
puts file.size
=> 8558
Upvotes: 3