want to "push files to a client page"?
<CFHEADER NAME="Content-Disposition" VALUE="attachment;
filename=#my_file_name#">
<CFCONTENT TYPE = "application/unknown" FILE="#hard_path_to_file#"
DELETEFILE="no">
<CFABORT>
...works for us with PDF's and brings up the "save as" box.
Shawn Grover wrote:
>
> 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]

