Alex Agerholm wrote:
Hi,

Is it possible to make download of files like you can make upload of files
from a CGI script ?

If I understand you correctly you want to send something other than HTML bascially? This works very similar to regular HTML cgi scripts, except you will need to send a different header, and assuming what you are sending is binary data set binmode when you open the file.... for example:

print "Content-type: image/gif\n\n";

my $IMAGEFILE;
open($IMAGEFILE,'/path/to/image/file') or die "Can't open image file for output: $!";
binmode($IMAGEFILE);
print <$IMAGEFILE>;
close($IMAGEFILE);

This prints a "gif" file, you will need to set the header to whatever type of file you are sending. (Untested)

http://danconia.org


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to