From: thefed Date: 2008-01-02T03:18:25+09:00 Subject: Re: Best way to download >1GB files On Dec 31, 2007, at 7:20 PM, Tim Hunter wrote: > thefed wrote: >> But doesn't open-uri download the whole thing to your compy? I was >> about to use it, but then I ran it in irb and saw it returned a >> file object. > > Isn't that what you want to happen? I thought your question was > about how to download it in small chunks so it's not all in memory > at the same time. This code downloads the whole file, but 8kb at a > time. No, I thought when you use Kernel#open with open-uri, it FIRST downloads the entire 1GB file to your temp folder, and THEN runs your block on that file in temp