Date:  07/31/2002 01:45:11 PM Msg ID:  000787
From:  Alan Harris-Reid Thread:  000780
Subject:  Re: File download problem
I've amended my code to resemble the Foxweb code below, and the downloaded files are fine.  My problem now is that when the user is presented with the download save dialog, it says "You are about to download file Download" and the save folder dialog calls the file Download by default.
 
I think it's something to do with the fact that the script containing the code below is called DownLoad.fwx, and it is called from a link on another script using the code...  There is no other code in the script.  I am using IE6.
 
Click <a href="DownLoad.fwx?filename=Myzip.zip">here</a> to download.
 
The downloaded file is definitely MyFile.zip, but with the wrong filename.  How do I get the download save dialog to say 'MyFile.zip' instead of 'Download'? 
 
TIA
Alan
 
<%
Response.ContentType = "application/x-zip-compressed"
Response.AddHeader("Content-Disposition", "attachment; filename=MyFile.zip")
* Read contents of file into string
FileContent = FILETOSTR("MyFile.zip")
* Specify size so that progress bar works properly
Response.AddHeader("Content-Length", Server.ToString(LEN(FileContent)))
Response.Write(FileContent)
Response.End
%>