Learning ColdFusion 8: CFZip Part II - Zipping Files And Directories With CFZipParam

<!--- Read in the image file as binary data. --->
<cffile
	action="readbinary"
	file="#ExpandPath( './data/images/mud_monster.jpg' )#"
	variable="binImage"
	/>
 
<!---
	Create a zip archive that contains a single
	entry. This entry will be created from binary
	image data, not from a file on the server. We
	are going to overwrite any previously existing
	archive of the same name.
--->
<cfzip
	action="zip"
	file="#ExpandPath( './data.zip' )#"
	overwrite="true">
 
	<!---
		Add a single entry using the given image binary
		data into the given entry path.
	--->
	<cfzipparam
		entrypath="mud_monster.jpg"
		content="#binImage#"
		/>
 
</cfzip>

For Cut-and-Paste