Posts

Showing posts with the label cfcontent

Create a Zip file and make available for download using Coldfusion 8

Image
Coldfusion 8 has the tag CFZIP by which we can zip/unzip a folder in the server. For creating a file download, that is, the user will be prompted for saving the file, we can use CFHEADER tag. We can use CFCONTENT tag to deliver the content in an unpublished directory (not mapped to web server) to the user. Now, let us begin with cfzip. <cfzip action="zip" source="C:\myfiles\myphotos" file="c:\download\myphotos.zip">