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=string, attributes=string, acl=object );

Returns: Array

Argument Description
string, required

Absolute pathname of directory or file on web server.

string, optional

Limits the MIME types to accept. Comma-delimited list. For example, to permit JPG and Microsoft Word file uploads: accept = "image/jpg, application/msword" The browser uses file extension to determine file type.

Alias: mimeType

string, optional

Action to take if filename is the same as that of a file in the directory.

  • skip
  • error
  • overwrite
  • makeunique

Alias: onConflict

string, optional

Applies only to Solaris and HP-UX. Permissions. Octal values of UNIX chmod command. Assigned to owner, group, and other, respectively.

string, optional

One attribute (Windows) or a comma-delimited list of attributes (other platforms) to set on the file. If omitted, the file's attributes are maintained.

object, optional

Only used for S3 Resources


<form name="myUpload" method="post" enctype="multipart/form-data">
    <input type="file" name="fileDataOne">
    <input type="file" name="fileDataTwo">
    <input type="file" name="fileDataThree">
    <input type="submit" name="submit">
    if (structKeyExists(form, "submit")){
        uploadfile = fileuploadAll(getTempDirectory(),"","makeunique");

See also