fileUploadAll

Uploads all files sent to the page in an HTTP request to a directory on the server.

fileUploadAll(destination,[mimeType,[onConflict]]) → returns array

fileUploadAll Argument Reference

destination string
Required

Path of directory in which to upload the file. If not an absolute path (starting with a drive letter and a colon, or a forward or backward slash), it is relative to the ColdFusion temporary directory returned by the function getTempDirectory. If the destination you specify does not exist, ColdFusion creates a file with the specified destination name.

mimeType string

Limits the MIME types to accept. Comma-delimited list. For example, the following code permits JPEG and Microsoft Word file uploads:'image/jpg,application/msword' .The browser uses the filename extension to determine file type.

onConflict string
Default: error

Action to take if file has the same name of a file in the directory.
Values:
  • error
  • skip
  • overwrite
  • makeUnique

strict boolean
Default: true

Defines which method is used to determine the file type to check against the value of the mimeType parameter.
true: The first few bytes of the uploaded file are used to determine the MIME type.
false: The MIME type provided by the browser in the request payload is used.

continueOnError boolean
Default: false

CF 11+ Whether to continue uploading the remaining files when uploading one of the files fails.

errorVariable variableName

CF 11+ The name of the variable in which the file upload errors will be stored.

Fork me on GitHub