Being new to ColdFusion, the following issue has me stumped. I am supporting a site that allows the user to click on a file link and the corresponding application opens and displays the "document". However, the name that is displayed is the name of the CF page, not the name of the file. Using CF Help as well as searching on the internet, it appears that the following code should work:
<cfheader name="Content-Disposition" value="inline; filename=#filename#"> <cfcontent type="#cont_type#" file="#file_path#"> For example, for one of the files that is an audio file, I have confirmed that 'filename' = "my_audio.mp3"; 'cont_type' = "audio/mpeg"; and 'file_path' contains the full path of the file. The Windows Media Player (WMP) opens correctly and plays the audio file, but the name that appears in WMP is the name of the CF page -- i.e. "file_viewer.cfm" -- instead of "my_audio.mp3". If I substitute "attachment" for "inline", then the "Save As" dialog shows the correct name -- my_audio.mp3 for this example. We would prefer not to make them save each link they click on. This issue appears to be related to Microsoft products -- this happens for MS Word, MS Excel, WMP, etc. However, files like PDFs and ZIP files open the appropriate application and display the correct name. Any suggestions would be appreciated. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216173 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54