> Is there a way round this or is it a 'feature'? No, I get this problem too when using the attachment setting. 2 'Save' windows. Trouble is, for me, I'm passing the filename in the URL, but encrypted using the 'encrypt' and urlencoded....the file download name that appears in the first save box is still encrypted, even though the filename variable that is passed to cfheader and cfcontent is decrypted....eh? I have an additional problem, I was trying to display the PDF inline using: <cfset document_pdf = decrypt(url.filename, the_decryption_key)> <cfheader name="Content-Disposition" value="inline; filename=#document_pdf#"> <cfcontent type="application/pdf" file="physical_path_outside_webroot/#document_pdf#" deletefile="No"> This means that I can keep the files externally from the webroot and thus stop people browsing them... This displayed the PDF from within Explorer as intended on my PC, but other users' browsers got an 'Error Locating Object Handler' error for mime type text/html even though they had the latest version of Adobe Acrobat installed... (this is for a LAN) (!) Eh? (I can't use CFLocation because the file is located outside of the root...) I've set up 2 versions to test, I'd be interested to see if anyone actually gets the inline one, as I can. http://www.funjunkie.co.uk/pdf_download.cfm ------------------------------------------------------- Rich Wild Senior Web Designer ------------------------------------------------------- e-mango.com ltd Tel: 01202 587 400 Lansdowne Place Fax: 01202 587 401 17 Holdenhurst Road Bournemouth Mailto:[EMAIL PROTECTED] BH8 8EW, UK http://www.e-mango.com ------------------------------------------------------- This message may contain information which is legally privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any unauthorised disclosure, copying, distribution or use of this information is strictly prohibited. Such notification notwithstanding, any comments, opinions, information or conclusions expressed in this message are those of the originator, not of e-mango.com ltd, unless otherwise explicitly and independently indicated by an authorised representative of e-mango.com ltd. ------------------------------------------------------- > -----Original Message----- > From: Bert Dawson [mailto:[EMAIL PROTECTED]] > Sent: 27 November 2000 18:51 > To: CF-Talk > Subject: CFCONTENT - open file from current location > > > 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 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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

