I have a link on another page the take me over to the page that contains the code below:
<CFSET FPATH = #GetDirectoryFromPath(ExpandPath("*.*"))#>
<cfdirectory directory="#FPATH#" name="FILES" action="LIST">
<CFIF #FILES.NAME# EQ "test.cfm">
<A href="#FILES.NAME#"> #FILES.NAME#
<cfheader name="Content-Disposition" value="attachment;filename=#FILES.NAME#">
When I select the test.cfm link, a dialog box appears asking to either Save or Open the file.
The issue is the file, test.cfm, contents is not what is being saved or displayed when Open is selected.
Is there something I'm missing?
I am trying to download a text file, not a cfm file.