I've actually dealt with this allot. Here's the solution that I came up with
which seems to work the best:
<cfheader name="Content-Disposition" value="attachment;
filename=#url.file#">
<CFIF HTTP_USER_AGENT CONTAINS "MSIE">
<CFCONTENT TYPE="#mimetype#" FILE="#path##url.file#">
<CFELSE>
<CFCONTENT TYPE="application/unknown" FILE="#path##url.file#">
</CFIF>
I found inconsistencies between Netscape and IE, so I had to use this
conditional code for each possibility. For IE you need to supply the mime
type of the document but for Netscape you should supply the mime type
"application/unknown" no matter what the document type is. You might have to
play with these options to get the result you want. I also use this for
displaying only:
<cfheader name="Content-Disposition" value="inline; filename=#url.file#">
<CFCONTENT TYPE="#mimetype#" FILE="e:\WEBDOCS\STANT#doc_path##url.file#">
I found it worked well to secure documents outside of the web directory that
way.
Rick
-----Original Message-----
From: Christian Wip [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 27, 2000 2:11 PM
To: Fusebox
Subject: CFCONTENT
I need some help...
I would like to use the CFCONTENT tag (or equivalent tag) to download
spreadsheets. However, I need to have the actual spreadsheet name rather
than the cf template name appear as the default "save as" name.
For example, if I call MY_FILE.XLS in a CFCONTENT tag located in
SOME_CF.CFM, the default "save as" name offered by the browser will be
SOME_CF.CFM rather than MY_FILE.XLS...
For security reasons I don't want to give the client the straight URL to the
actual document.
Any suggestions, custom tags, etc?
Thanks, Christian.
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.