From: Brian Candler Date: 2003-04-10T17:31:07+09:00 Subject: Re: sending a file via http On Thu, Apr 10, 2003 at 10:22:13AM +0900, Andrew wrote: > I'm not getting any errors. The problem is that the whole file isn't being > read. It reads some and outputs what it reads, but it's far from reading > everything. I have a 30MB file and it's only reading a handful of bytes and > then stops (no errors). I want it to read the whole file, not part of it. Please describe how you know that it is outputting only a few bytes of your file. Can you try the following four-liner: #!/usr/local/bin/ruby $stdout.binmode print "Content-Type: application/octet-stream\r\n\r\n" f = File.open("/path/to/album.zip").read print f and if that doesn't work then we can try to narrow it down from there. Cheers, Brian.