Downloading file not the correct contents
hi,
i have link on page take me on page contains code below:
<cfoutput>
<cfset fpath = #getdirectoryfrompath(expandpath("*.*"))#>
<cfdirectory directory="#fpath#" name="files" action="list">
<table>
<cfloop query="files">
<tr><td>
<cfif #files.name# eq "test.cfm">
<a href="#files.name#"> #files.name#
<cfheader name="content-disposition" value="attachment;filename=#files.name#">
</a>
</cfif>
</td>
</tr>
</cfloop>
</table>
</cfoutput>
when select test.cfm link, dialog box appears asking either save or open file.
the issue file, test.cfm, contents not being saved or displayed when open selected.
is there i'm missing?
thanks,
mike
i trying download text file, not cfm file.
mike
More discussions in ColdFusion
adobe
Comments
Post a Comment