Forum Moderators: mack
<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 opens correctly and plays the audio file, but the name that appears is the name of the CF page (i.e. "file_viewer.cfm") This also happens for MS Word, MS Excel, and other documents.
Any suggestions would be appreciated.
That being said, I do this exact thing in one of our applications.
I generate tab delimited text and put it in file_output Then
<cfheader name="Content-Disposition" value="attachment;filename=""TAB_Batch.txt""">
<cfcontent type="application/ms-excel"><cfoutput>#file_output#</cfoutput><cfabort>