I've had a decent luck by using

<cfheader name="Content-Disposition" value="inline; filename=report.xls">

before the cfcontent tag.

HTH

Marlon

-----Original Message-----
From: Cold Fusion [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 12:00 PM
To: CF-Talk
Subject: forcing downloads


Hi folks..

can anyone help us out with this one, it should be so simple and I just
can't accept all the hassle we've been having to try and figure it out.

What we want to do is have the user click a link to a cfm file, that cfm
file then returns a file (for arguements sake a .xls file) which starts to
download to the users machine (forcing download rather than returning to
browser).

We've tried using CFCONTENT and setting the type to unknown, this will
start the file downloading all right but the name that appears in the
dialog boxes is the name of the orginal cfm file that was called rather
than the name of the actual file (i.e. saves as "download.cfm" rather than
"file2download.xls" )

surely this is a simple operation? ... I really hope somebody can make me
look stoopid with the answer..

in hope

.jez
----
Jeremy Becker ([EMAIL PROTECTED])
100 High Street Wandsworth
London SW18 4LA
United Kingdom
Tel: 020 8871 4240      Fax:020 8871 4584
http://www.bta.com

Network Consultancy and Support for Windows 9x/NT and MacOS.
Internet connectivity, solutions, and business services.  

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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to