Listing 1: cffile_upload.cfm

< CFPARAM name="attributes.filefield">
< CFPARAM name="attributes.destination">
< CFPARAM name="attributes.accept" default="*/*">
< CFPARAM name="attributes.mode" default="0">
< CFPARAM name="attributes.attributes" default="normal">
<CFPARAM name="attributes.nameconflict" default="error">

<CFFILE action="UPLOAD" destination="#attributes.destination#"
filefield="#attributes.filefield#" nameconflict="#attributes.nameconflict#"
accept="#attributes.accept#" mode="#attributes.mode#"
attributes="#attributes.attributes#">

<CFSCRIPT>
caller.file.attemptedServerFile = file.attemptedServerFile;
caller.file.clientDirectory = clientDirectory;
caller.file.clientFile = clientFile;
caller.file.clientFileExt = clientFileExt;
caller.file.clientFileName = clientFileName;
caller.file.contentSubType = contentSubType;
caller.file.contentType = contentType;
caller.file.dateLastAccessed = dateLastAccessed;
caller.file.fileExisted = fileExisted;
caller.file.fileSize = fileSize;
caller.file.fileWasAppended = fileWasAppended;
caller.file.fileWasOverwritten = fileWasOverwritten;
caller.file.fileWasRenamed = fileWasRenamed;
caller.file.fileWasSaved = fileWasSaved;
caller.file.oldFileSize = oldFileSize;
caller.file.serverDirectory = serverDirectory;
caller.file.serverFile = serverFile;
caller.file.serverFileExt = serverFileExt;
caller.file.serverFileName = serverFileName;
caller.file.timeCreated = timeCreated;
caller.file.timeLastModified = timeLastModified;
</CFSCRIPT>