I'm trying to use CFCONTENT to serve up a pdf file.
The code is below, though i've changed the various file names so i can follow what is 
happening:

<CFIF IsDefined('url.gimme')>
  <CFHEADER 
       NAME="Content-Disposition" 
       VALUE="attachment; filename=cfheader_name.pdf">
  <CFCONTENT 
       TYPE="application/pdf"
       FILE="D:\server_name.pdf" 
       DELETEFILE="No">
</CFIF>
<A HREF="?gimme=/url_name.pdf">get the pdf</A>

If I click on the link then it gives the choice to download or open from current 
location, and uses the file name from the url (url_name.pdf).
If i choose Save, then it saves it using the filename from the CFHEADER tag 
(cf_header.pdf).
Thats all great, cos i can use the same filename in each tag.
But, if i choose to open "url_name.pdf" from its current location then another File 
Download window pops up and asks the same open/save question, except this time using 
cfheader_name.pdf as the file name.
Is there a way round this or is it a 'feature'?

Cheers
Bert

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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