The code for the Interface(form) for multi_file upload
<body>
<div id="EAFlashUpload_placeholder"></div>
<cfparam name="session.multiUploadError" default="">
<cfif session.multiUploadError neq "">
<font color="#FF0000"><em> <strong>Error Uploading File: </strong>
<cfoutput>#session.multiUploadError#</cfoutput></em></font>
<!--- ok. now wipe the error message clean for next time --->
<cfset session.multiUploadError = "">
</cfif><p></p>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var params = {
wmode: "window"
};
var attributes = {
id: "EAFlashUpload",
name: "EAFlashUpload"
};
var flashvars = new Object();
flashvars["uploader.uploadUrl"] = "http://iapreview.ars.usda.gov/admin/sp2.5/MultiFileUpload.cfm";
flashvars["viewFile"] = "TableView.swf";
flashvars["queue.filesCountLimit"] = "30";
flashvars["uploader.retrieveBrowserCookie"] = true;
swfobject.embedSWF("EAFUpload.swf", "EAFlashUpload_placeholder", "450", "350", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</body>
The code for the backend ColdFusion script
<cftry>
<cfif isDefined("Form.Filedata")>
<cffile action="UPLOAD" filefield="Filedata" destination="#session.siteDirectory#\#session.Directory#" nameconflict="OVERWRITE">
<cfif right(cffile.clientFile, 3) neq "htm" and right(cffile.clientFile,4) neq ".htm">
<cfelse>
<cffile action="delete" file="#session.siteDirectory#\#session.Directory#\#cffile.clientFile#">
<cfset session.multiUploadError = " " & session.multiUploadError & " #cffile.clientFile# could not be uploaded, because html files are not permitted.<br> ">
</cfif>
<!---
<cffile action="APPEND" file="f:\sitepublisher_dev\sp2\juploadoutput.txt" output="#idx# - #session.siteDirectory#\#session.Directory#\#cffile.clientFile# (#cffile.fileSize#) at #cffile.timeLastModified#" addnewline="Yes">
--->
</cfif>
The file has not been saved. Please check destination folder exists and has read/write permissions.