Theres a bug in IE (
http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP?LN=EN-US&SD=g
n&FR=0&qry=force%20download&rnk=8&src=DHCS_MSPSS_gn_SRCH&SPR=IEP) that
breaks this horrably, I could only get round it by doing a
window.open(get.cfm) and having get.cfm send 
<cfheader name="Content-type" value="bad/type">
<cfheader name="Content-Disposition" value="attachment; filename=#file#" >
<cfcontent type="bad/type" file="#DocName#>
Then using jscript to close the window.

Ick.

Netscape manages with no hassle, calling get.cfm direct in the href.

-----Original Message-----
From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 9:37 PM
To: CF-Talk
Subject: Re: force download <cfcontent>;<cfheader>


When I want to force download of a particluar kind of file, I add/change
the mime type in the webserver, then just cflocate to the file.

For example. For the files on www.digitacamera.com (.csm files), my
mime.types files includes:

type=text/digitascript  exts=csm

Since that's unknown to the browser, it prompts for download...

> I have a link where a user can download a PowerPoint file.  The link goes
to
> this page (basically) ...
> 
> <cfheader name="Content-Disposition" value="attachment;
> filename=ppFile_Name.ppt">
> 
> <cfcontent type="application/unknown" file="c:\inetpub
> wwwroot\ppFiles\ppFile_Name.ppt">
> 
> When I click the link I get the File Download dialog box but it wants to
> download the cfm template that called this template (the page with the
> link).  It also tries to download the page as a .html file instead of
..cfm.
> 
> If I call the page with a target="_blank" in the link it downloads the ppt
> fine, but them I'm stuck with a browser window open with an error, "The
page
> cannot be displayed".
> 
> Any suggestions?
> 
> Thanks,
> Tim Bahlke
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to