Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfcontent file/mime SAVE AS filename problem 1

Status
Not open for further replies.

chidori

Technical User
Jun 13, 2002
7
0
0
US
Hi,

I am trying to make a coldfusion page return a file to a user whenever the user clicks on the link, but whenever the SAVE AS dialouge box opens the default "save as" name is the same name as the webpage and not the name of the actual file it is saving.

For example:
in my actionpage.cfm I use the following code:

<CFCONTENT TYPE=&quot;application/excel&quot; FILE=&quot;c:\Inetpub\
It returns the exceltemp file to the user however, the default save as name is actionpage.cfm which can really confuse the user because the file they are saving is actually called exceltemp.xls. the reason why I can't directly link to the file is because I am dynamically generating it whenever people click on the coldfusion page.



Thanks in advance
 
Try adding this to your code:

<CFHEADER NAME=&quot;content-disposition&quot; VALUE=&quot;attachment; filename=exceltemp.xls&quot;>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top