From: Ruchira Bomiriya Date: 2008-05-30T22:55:01+09:00 Subject: Re: Newby Question: Check image size before getting with Net::Http On May 30, 7:52 am, Heesob Park wrote: > Hi, > > 2008/5/30 Ruchira Bomiriya : > > > Dear Expert, > > > I want to check the file size of a URI to identify large files (I will > > decide on threshold) without having to get the whole file first. > > > Can I get just the file size using something related to Net::Http > > (don't know if Propfind would help and if it does how). > > require 'net/http' > > response = nil > Net::HTTP.start('www.biostat.wisc.edu', 80) {|http| > response = http.head('/bcg/categories/languages/ruby/ruby_logo.png') > } > p response['content-length'] > > Regards, > > Park Heesob Thank you very much Park. Ruchira