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]
- Security implemention question richard
- Re: Security implemention questio... Thanos Chatziathanassiou
- Re: Security implemention que... Richard Curtis
- Re: Security implemention... Josh Chamas
- Re: Security implemention questio... Theo Schlossnagle
- Re: BinaryWrite and filenames Richard Curtis
- Re: BinaryWrite and filen... Csongor Fagyal
- Re: BinaryWrite and f... Richard Curtis
- Re: BinaryWrite ... Csongor Fagyal
- Re: BinaryWr... Tim Moore <[EMAIL PROTECTED]>
- Re: Bina... Csongor Fagyal