Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 650
Product
FileUp
Title
Downloading using FileUp's TransferFile method always results in "SaveAs" dialog in Internet Explorer.
Problem

The TransferFile method of FileUp returns a file in the server response to the client. The Content-Disposition header can be set to inform Internet Explorer whether a file should be opened in the browser or prompt for saving to the file system.

If the downloaded file's associated application is available to Internet Explorer as a plug-in, the file can be marked to open in the browser by setting the Content-Disposition header to "inline":

Response.Addheader "Content-Disposition", "inline;filename="myWordFile.doc"

To force a prompt with a "Save As" dialog box, set the header to "attachment":

Response.Addheader "Content-Disposition", "Attachment; filename="myWordFile.doc"

If however, when specifying "inline", Internet Explorer continues to prompt with a "Save As" dialog, then it will be necessary to alter the security settings associated with the file extension of the file that you are trying to download. The following instructions assume the download of a Microsoft Word document (*.doc).

For a demonstration and code source, please see the download examples at: http://demo.softartisans.com/demo-293.aspx

Solution
Disabling client-side security settings which force an "Open or Save" dialog box With the IE browser, you will be prompted with a dialogue when you attempt to open a Word File directly in the browser when the "Confirm open after Download" option is enabled. To disable this option, go:

  • Go to > "Windows Explorer".
  • Then click "Tools" -> "Folder Options".
  • Change to the "File Type" tabs.
  • Scroll down to locate the file type. Highlight "DOC" and click the "Advanced" button.
  • Then uncheck the option "Confirm open after download".
  • Click "OK to confirm.
Created : 6/26/2003 3:03:58 PM (last modified : 2/8/2007 3:27:53 PM)
Rate this article!
Comments