you could use a combination of <cfcontent> and <cfheader> to do this

for example

<cfheader name="content-disposition" value="attachment;filename=MyFile.txt">
<cfcontent file="physicalPathToFile" type="text/plain">

this should do what you are talking about.

-chris.alvarado
[application developer]
4|Guys Interactive, Inc.
------------------------------------
http://www.4guys.com


----- Original Message -----
From: "Nick McClure" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2002 4:45 PM
Subject: Re: Download Text file


> I think it depends on how the browser is set up to take it. Most servers
> send text/plain for the content type of a .txt file. If you edit the mime
> type in the server to be application/text or whatever, other than text/*
it
> will probably force the client to download the file.
>
> If that doesn't work, make a zip file ;)
>
>
> At 03:47 PM 1/15/2002 -0600, you wrote:
> >OK, I know this is an HTML 101 question, but I can not for the life of
> >me remember how to do this.  How can I download a text file by simply
> >allowing the user to click on a link?  Normally, you just treat it like
> >any other non html file and the browser will invoke the explorer window
> >and give you the change to "Save as..." but the .txt file just shows up
> >in the browser.  Anyone? Bueller? Bueller?
> >
> >Thanks all,
> >
> >Michael Corrigan
> >Programmer
> >Endora Digital Solutions
> >1900 S. Highland Avenue, Suite 200
> >Lombard, IL 60148
> >630/627-5200 x-136
> >630/627-5255 Fax
> >
> >
> 
______________________________________________________________________
Macromedia ColdFusion 5 Training from the Source
  Step by Step ColdFusion
  http://www.amazon.com/exec/obidos/ASIN/0201758474/houseoffusion

Archives: http://www.mail-archive.com/cf-community@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to