Shawn:

Your CFHEADER is missing a value.  The VALUE for the Content-Disposition
header should begin with either "inline;" or "attachment;" as in:

<CFHEADER NAME="Content-Disposition"
VALUE="inline; filename=#oFTS.OriginalName#">

See RFC1806 ( http://www.faqs.org/rfcs/rfc1806.html ) for more details.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/

-----Original Message-----
From: Shawn Grover [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 12:52 PM
To: CF-Talk
Subject: CFContent and PDF problems

We're using a CFContent to push files to a client page (after they've
clicked on an appropriate link of course).  Things are working for image
files, but we are getting odd behaviour when we try to view PDF documents.

Here's the code in question:

  <!--- Set the name of the download file in the HTTP header --->
  <CFHEADER NAME="Content-Disposition" VALUE="filename=#oFTS.OriginalName#">
  <!--- Send the file (using the physical path to it) --->
  <cfcontent type="#sMimeType#" file="#sSourcePath#" deletefile="no">

and the supporting variables are:
  Mime TYpe: application/pdf
  File Name: 2003100809073301noisereport.pdf
  Path and File:
C:\inetpub\wwwroot\caa\ctreg_web\fts_files\2003100809073301noisereport.pdf

What's happening is that the PDF file is getting dumped as raw text to the
page, or we see a prompt to save our action page (getfile.cfm).  However,
this is a near exact copy of an existing routine from another application we
did.  In the other application, the PDF plug-in kicks in and we view the
file in Adobe Acrobat.  It would appear that in the process of copying and
modifying the code, something minor was changed to result in this new
behaviour.  However, we've now had 3 people look at the code and we don't
see anyting that should be causing this issue.

Does anyone see anything wrong or have any suggestions?  My thoughts are
that we have missed something stupid...

Thanks in advance.

Shawn


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to