Philipp Hofmann
4/8/2008 2:54:00 AM
how about
require 'open-uri'
open(ARGV[0]) { |f| puts f.size }
i'm not sure if this will GET the file even if you don't access its
data, because the size info should already have been communicated
within http, in that case there might be are more convinient way only
using http probing for the size.
g phil
On Tue, Apr 08, 2008 at 10:54:23AM +0900, Tj Superfly wrote:
> Hello everybody,
>
> I'm looking for a way that I could insert a URL for an image that is
> online and have it tell me what size it is?
>
> I've been messing around with File.size? and file.size and havn't quite
> gotten it to work, am I missing something?
>
> Thanks in advance.