logo       

RE: Renaming a CFContent File: msg#00072

cms.cold-fusion.user.azcfug

Subject: RE: Renaming a CFContent File

Send the following:

<CFHEADER NAME='Content-Disposition' VALUE='attachment;
filename="filenametheusersees.ext"'>

Michael J. Sheldon
http://www.desertraven.com/
PGP Key Available on Request

-----Original Message-----
From: Judd M. Miller [mailto:juddmiller@xxxxxxxxxxxxx]
Sent: Wednesday, July 19, 2000 12:21
To: AZCFUG; BACFUG List
Subject: [azcfug] Renaming a CFContent File


Hi, all.

I have a section where users can download Word and PDF documents. When
they click the "download" link, it takes them to DownloadMMAsset.cfm,
which logs the download, sends me an email, then runs the following
CFContent to initiate the download:

<cfcontent type="#DocumentType#"
file="#PathToDocumentRoot##DocumentFile##DocumentCode#"
deletefile="no">

Netscape pops up the typical "Open" or "Save To Disk" dialog box. If
the user chooses Save To Disk, the filename is "DownloadMMAsset.doc",
the same name of the script they're running. I want it to be the name
of the file --- "WebExBrochure.doc" or whatever. Is there any way to
control this?

I have a worse problem with IE. IE intelligently opens the Word
document instantly just by clicking on the download link, which is
cool. But if you right-click on the link and select "Save Target
As...", it names the file "VerticalAlliance.htm" (?!?!), and once
downloaded, includes html code in the page, which includes a Login.cfm
script that breaks the Word file on opening. (Of course, that's because
saving that target is saving DownloadMMAsset.htm, NOT the file). Any
suggestions on how to handle this elegantly?

Thanks for any suggestions!

---Judd Miller
Senior Programmer
Vertical Alliance, Inc.



__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail ? Free email you can access from anywhere!
http://mail.yahoo.com/

------------------------------------------------------------------------
Find long lost high school friends:
http://click.egroups.com/1/7080/13/_/_/_/964034485/
------------------------------------------------------------------------

To unsubscribe from this group, send an email to:
azcfug-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx








<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise