FileUpload()
Uploads file to a directory on the server.
it return the status of the upload operation as a struct after the file upload.
FileUpload( destination=string, fileField=string, accept=string, nameConflict=string, mode=string, attributes=string, acl=object );
Returns: Struct
Examples
<form name="myUpload" method="post" enctype="multipart/form-data">
<input type="file" name="fileData">
<input type="submit" name="submit">
</form>
<cfscript>
if (structKeyExists(form, "fileData") and len(form.fileData) ){
uploadfile = fileupload(getTempDirectory(),"form.fileData"," ","makeunique");
writeDump(uploadfile);
}
</cfscript>
See also
- File handling
- File Upload Operation Result
- FileUploadAll()
- <cffile>
- <cffileupload>
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)