Hi.
I am trying to implement binary write code, and have it working with the code shown below (note: this is only sample code - this code would not be put into production and I am aware of the problems it currently has). I still have one problem which has me stumped.

Any file sent to the browser this way always takes the name of the running script. Eg, so I am streaming "test.zip" but when the file save as dialog pops up, it offers the name of "downloadTest.asp".

Is there a way around this ?
I am guessing I need to add another header, but cant find what to add :(

This is the source:
"downloadTest.asp"
<%

$Response->{ContentType} = "application/pdf";
my $file = "/home/testapp/data/downloads/test.pdf";
open FH, $file;
binmode FH;
$/ = undef;
my $data = <FH>;

$Response->Clear;
$Response->AddHeader('Content-Length',length $data);
$Response->BinaryWrite($data);
$Response->End;
%>

Richard


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

Reply via email to