View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
The headers included in the sample code (content-type and content-disposition) will cause most browsers to do the right thing, although we have seen bugs in even a couple of modern browsers.  These headers along with other pertinent information are discussed in the Returning Non-HTML Content section of the Returning Content to the Browser page of the FoxWeb documentation. 

FoxWeb Support Team email

Sent by Alan Harris-Reid on 07/31/2002 01:45:11 PM:
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?">here</a> to download.
The downloaded file is definitely, but with the wrong filename.  How do I get the download save dialog to say '' instead of 'Download'? 
Response.ContentType = "application/x-zip-compressed"
Response.AddHeader("Content-Disposition", "attachment;")
* Read contents of file into string
FileContent = FILETOSTR("")
* Specify size so that progress bar works properly
Response.AddHeader("Content-Length", Server.ToString(LEN(FileContent)))