<!--- force download dialogue box to open --->
<cfoutput>
  <cfheader name="Content-type" value="application/octet-stream">
  <cfheader name="Content-Disposition" value='attachment; filename="#FileName#"'>
  <!--- if this fouls up in various browsers...try trailing slash in file attribute below --->
  <cfcontent file="#FullFilePath.Value#" type="application/octet-stream">  
</cfoutput>

The application/octetstream mime type will ALWAYS force the download dialgue window and the above code will always show the correct file name and extension to download

HTH

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
  ----- Original Message -----
  From: Mary Jo Sminkey
  To: CF-Talk
  Sent: Thursday, February 05, 2004 8:36 AM
  Subject: Re:CFHeader/CFContent woes.

  ><CFHEADER NAME="Content-Disposition" VALUE="attachment;
  >filename=fax_tenant.doc">
  ><cfcontent type="application/msword"
  >file="c:\inetpub\wwwroot\app\fax_tenant.doc" deletefile="No">
  >
  >The problem is that no matter what I do to the cfheader line, I NEVER see
  >"fax_tenant.doc" as the requested filename.  I see the name of the .cfm file
  >(which is word_test.cfm in this case).  I wouldn't really care if the thing
  >would at least display or save the word file.
  >

  Was searching for solutions for this same problem and came across this thread, but have yet to find any reason for it. It's very frustrating because it works fine in development, but on production, it won't give us the Word file. We are running the same Win2K server on both, same service pack, same version of Cold Fusion, and of course, I'm viewing these pages on the same IE browser. I've run out of options to check at this point, surely there is *some* reason this is happening!

  ----------------------------
  Mary Jo Sminkey
  [EMAIL PROTECTED]
  http://www.cfwebstore.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to