Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[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... #!/usr/bin/rebol -cs REBOL [] print "Content-Type: binary/octet-stream^/" file: read/binary %path-to-file print file but of course PRINT corrupts the file and the name is the name of the script, not the file. 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... http://www.rebol.com/docs/words/wread-io.html should anyone in the future find this thread useful. And apologies again for sending you off on the wrong track. -- Carl Read.