perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Csongor Fagyal <conc...@conceptonline.hu>
Subject Re: BinaryWrite and filenames
Date Fri, 17 Jan 2003 15:51:37 GMT
Richard Curtis wrote:

>
>>> 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".
>>
>>
>>
>> Try calling your script as
>> <a href="..../downloadTest.asp?file=test.zip">
>>
>> It should trick your browser.
>>
>> - Cs.
>
>
> Thanks for the advice, but unfortunately it did not work for me.
> I have found a solution which is to set 
> "$Response->AddHeader('Content-Disposition',"attachment; 
> filename=test.zip");"
>
> This works fine in Konquerer, and Mozilla 1.1 on Linux, and on Windows 
> IE, Opera, but NOT Mozilla 1.2.1.
> I am guessing it might be a mozilla bug as mozilla names the 
> downloadable file to be "test.zip.asp"
>
> Anyone got any thoughts ?

Sorry, my original post was wrong. But this one is working for me on all 
browsers:
<a 
href="http://url/download.asp/filename.zip?.asp&file=filename.zip">filename.zip</a>

- Cs.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message