> <CFHEADER NAME="Content-Disposition" value="inline;
> filename=D:\Attachments\ACF116.doc">
> <CFCONTENT TYPE="application/unknown">this is a test
>
> I don't know what the significance of using that cfcontent
> is, but I threw it in there. I also tried the page without
> the cfcontent, and it results in a blank page with no source.
The CFCONTENT tag tells the browser what MIME type the document is. By
default, output generated by CFML is the MIME type text/html.
The filename attribute in CFHEADER should just be the name of the file,
without path information. This file name is the name that the browser will
use to reference the file.
When I clicked on the link, it worked fine, except that it didn't prompt me
to save the file as "ACF116.doc", but rather as "test2.cfm". It did prompt
me to save the file, though, and the saved file contained the text "this is
a test", as it should.
However, in your example earlier, I thought you were trying to download an
existing file to the browser, rather than generate a new file dynamically.
Here's how you'd do that, if your file was "d:\attachments\acf116.doc":
<cfheader name="Content-Disposition" value="inline;
filename="mydocument.doc">
<cfcontent type="application/unknown" file="d:\attachments\acf116.doc">
This would retrieve the file from the attachments directory, and prompt the
user to save it as mydocument.doc.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.