Created
April 5, 2013 10:28
-
-
Save youcoldfusion/5318267 to your computer and use it in GitHub Desktop.
<cfdirectory>,<cfcontent>,<cfheader>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- It will download the file what we click---> | |
<cfcontent type="text/html" > | |
<cfheader name="Content-Disposition" value="attachment;filename=#url.name#" > | |
<cffile action="read" file="PATHTOTHEFOLDER\#url.name#" variable="displayFileContent" > | |
<cfoutput>#displayFileContent#</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- It will list all the files with anchors of the below mentioned folder---> | |
<cfdirectory directory="PATHTOTHEFOLDER" name="dirinfo"> | |
<h2>List of files</h2> | |
<cfoutput query="dirinfo"> | |
<a href="/contentDownload.cfm?name=#name#">#name#</a><br/> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment