FileUploadAll()
Saves files from all the form fields in a request to a specified directory/resource.
Also supports processing multiple file uploads from a single form field, i.e. <input type="file" name="file" multiple>
it return the status of the upload operation as array of struct after all files upload.
FileUploadAll( destination=string, accept=string, nameConflict=string, strict=boolean, allowedExtensions=any, blockedExtensions=any, strict=string, attributes=string, acl=object );
Returns: Array
Examples
<form name="myUpload" method="post" enctype="multipart/form-data">
<input type="file" name="fileDataOne">
<input type="file" name="fileDataTwo">
<input type="file" name="fileDataThree">
<span class="nt"><input</span> <span class="na">type=</span><span class="s">"submit"</span> <span class="na">name=</span><span class="s">"submit"</span><span class="nt">></span>
</form>
<cfscript>
if (structKeyExists(form, "submit")){
uploadfile = fileuploadAll(getTempDirectory(),"","makeunique");
writeDump(uploadfile);
}
</cfscript>
See also
- File handling
- File Upload Operation Result
- FileUpload()
- <cffile>
- <cffileupload>
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)