[REBOL] Re: CGI and binary files
From: carl:cybercraft at: 5-Jul-2005 21:39
On Monday, 4-July-2005 at 12:28:41 SunandaDH wrote,
Thanks Sunanda, but you misunderstood me. (Not difficult to do...) The files are on
my website and I want the CGI script to provide access to them for people to download.
(I thought of this as the CGI script uploading them - the wrong terminology to use,
no doubt.) The reason for using a script instead of providing the files directly is
I want to be able to manage the number of downloads, they being big files.
This gets close to what I want...
print "Content-Type: binary/octet-stream^/"
file: read/binary %path-to-file
but of course PRINT corrupts the file and the name is the name of the script, not the
Incidentally, the example you gave uses the read-cgi function, but it's not to be found
in the link you gave. I found it here though...
should anyone in the future find this thread useful.
And apologies again for sending you off on the wrong track.
-- Carl Read.