[thelist] Downloading Files in CF

Aaron Johnson ajohnson at mindseye.com
Tue Jun 12 12:56:03 CDT 2001


Chris,


> The problem comes when they try to download the files. I have tried to
> use cfcontent but without a proper mime type, it simply tries to save
> every file as foo.htm (the name of the page calling the file). I have
> tried to use an ftp server but it displays the loginid and the password
> at the bottom of the browser.
	-- You'll also want to watch out for a bug in IE 5.5 SP1 in regards to
content headers & trying to save files:



http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP?LN=EN-US


BUG: Content-Disposition Attachment Headers Does Not Save File

----------------------------------------------------------------------------
----
The information in this article applies to:

Microsoft Internet Explorer (Programming) version 5.5

----------------------------------------------------------------------------
----


SYMPTOMS
A Web server that uses the Content-disposition: attachment HTTP header to
force a file download should prompt the user to open or save the file;
however, in Internet Explorer 5.5 Service Pack 1 (SP1), the user is prompted
to open or save the HTML file instead.



RESOLUTION
To resolve this problem, refer to the hotfix that is described in the
following Microsoft Knowledge Base article:

Q281119 Internet Explorer Saves HTML Content Instead of the Active Document
WORKAROUND
There are several ways to work around this problem:
Bypass Content-disposition, and use either an ActiveX control or a Java
applet to download files to disk.


Use the Save As command from the pop-up menu.


Use the Internet Explorer download behavior instead. (This is for text-based
files only).


Use a window.showModalDialog of an HTML page that does a document.write of a
hidden IFRAME with the source pointing to the file.





STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at
the beginning of this article.


Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
ajohnson at mindseye.com





More information about the thelist mailing list