Copies all files sent to the page in an HTTP request to a directory on the server.
<cffile
action = "uploadAll"
destination = "full pathname"
accept = "list of MIME types"
attributes = "file attribute or list"
mode = "permission"
nameConflict = "behavior"
result = "result name">
attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.See
the History section of the main cffile tag page.
Attribute |
Req/Opt |
Default |
Description |
|---|---|---|---|
|
Required |
Type of file manipulation that the tag performs. |
|
|
Required |
Pathname 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, which is returned by the |
|
|
Optional |
Limits the MIME types to accept. Comma-delimited list. For example, the following code permits JPEG and Microsoft Word file uploads:
The browser uses the file extension to determine file type. |
|
|
Optional |
Applies to Windows. A comma-delimited list of attributes to set on the file. If omitted, the file’s attributes are maintained. Each value must be specified explicitly. For
example, if you specify
|
|
|
Optional |
Applies only to UNIX and Linux. Permissions.
Octal values of
|
|
|
Optional |
|
Action to take if filename is the same as that of a file in the directory.
|
|
Optional |
Lets you specify a name for the variable
in which |
Use this
tag in the page specified by the action attribute
of a cffileupload control. This tag uploads save
the files that the cffileupload control sends when
the user clicks the Save File button.
After a file upload
is completed, this tag creates an array of structures specified by
the result parameter. Each structure in the array contains upload
result information for one file. For information on the result structure
contents, see cffile action = "upload".
The following example copies files uploaded by a cffileupload tag to a temp directory.
<cffile action = "uploadAll"
destination = "c:\Upload"
nameConflict = "MakeUnique"
>