[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: sending a file via http
From: Brian Candler <B.Candler () pobox ! com>
Date: 2003-04-10 8:31:07
[Download RAW message or body]
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic