I have a similar problem but mine was with Excel not PDF.
Now I never had problem downloading CF-generated Excel files. Here is
the code I always used:
<CFHEADER
NAME="content-disposition"
VALUE="attachment; filename=something.xls ">
<CFCONTENT
TYPE="application/x-unknown"
FILE="something.xls"
DELETEFILE="yes">
This code worked perfectly fine until recently.
Just found out week that even though the downloaded file could be opened
by Excel and its type did seem to be Microsoft Excel, when I try to
upload the same file CF does NOT recognize its type as Excel but
text/html. I�ve tried many ways to modify the download process, as to
use �application/x-excel�, �application/ms-excel�,
�application/ms-excel� for CFCONTENT type. None of them helped. I
wondered if it was just a CFMX issue then I found out it�s the same with
CF5. It�s been quite frustrating for me. Does anyone know why this
happened or how I can fix it? Thanks a lot!
Ye
-----Original Message-----
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 2:17 PM
To: CF-Talk
Subject: RE: CFCONTENT and file downloads
Above your CFCONTENT tag, you have to create a new header (named
"content-disposition") to supply the new name, like:
<CFHEADER
NAME="content-disposition"
VALUE="attachment; filename=something.pdf">
<CFCONTENT
TYPE="application/pdf"
FILE="something.pdf"
DELETEFILE="No">
Make sure that the VALUE attribute of the CFHEADER tag begins with
"attachment" instead of "inline."
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
> -----Original Message-----
> From: ColdFusion (CFTalk) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 10:59 AM
> To: CF-Talk
> Subject: CFCONTENT and file downloads
>
>
> [CF5 Server Pro, Windows 2000]
>
> I have a feeling I've forgotten something obvious, but...
>
> In a nutshell:
>
> I have a template which uses CFCONTENT to download the contents of a
file
> on the server to the browser. The file save dialog on the browser
pops
> up... but the name of the file shown is the name of the template
> (somename.cfm) not the name of the actual file on the server
> (something.pdf
> in this case). Of course, the file then arrives on the other end with
the
> wrong extension... etc...
>
> Anyone any ideas on how to get the right filename down to the client.
If
> necessary, I can use a fixed name - the important thing is
> getting the .pdf
> extension (as the files are PDF's).
>
> Regards,
>
> SB
>
>
>
> Scott Bartlett
> BTA Limited, 100 High Street Wandsworth, London SW18 4LA, United
Kingdom
> e: [EMAIL PROTECTED] v: +44 (0)20 8871 4240 f: +44 (0)20 8871 4584
>
> Network Consultancy and Support for Windows 9x/NT and MacOS.
> Internet connectivity, solutions, and business services.
> http://www.bta.com.
>
> This message is intended only for the use of the person(s) ("The
intended
> recipient(s)") to whom it is addressed. It may contain
> information which is
> privileged and confidential within the meaning of applicable law. If
you
> are not the intended recipient, please contact the sender as soon as
> possible. The views expressed in this communication may not
> necessarily be
> the views held by BTA.
>
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists