Used to work with files on the server on which ColdFusion is installed. The action performed depends on the action attribute. For this tag to work, it must be enabled in the ColdFusion Administrator.
The type of action that the tag performs, including upload, move, rename, copy, read, delete, readBinary, write, and append.
Name of form field used to select the file. Do not use pound signs to specify the field name.
The absolute path name of a directory or file on the web server.
Action to take if filename is the same as that of a file in the directory.
error. File is not saved. ColdFusion stops processing the page and returns an error.
skip. File is not saved. This option permits custom behavior based on file properties.
overwrite. Replaces file.
makeUnique. Forms a unique filename for the upload.
You can limit the types of files that can be uploaded with this attribute. If you want to allow multiple file types, they should put into a comma-delimited list.
Applies only to Solaris and HP-UX. Enacts permissions and allows use of the chmod command. For example:
This enables you to set file attributes on a file. You can only set one attribute for Windows files. You can set a list of attributes for other platforms. Options include readOnly, hidden, and normal.
Absolute path name of a file on the web server.
Default: ISO-8859-1, which is the Java character set name used for the file contents.
Absolute path name of a file.
Name of variable to contain contents of text file.
Default: (ISO-8859)-1, which is the character encoding of generated output. Any valid character encoding is usable.
Content of the file to be created.
Default: Yes, which appends newline character to text. After a file upload is completed, you can get status information using the file upload parameters listed next. The status parameters use the cffile prefix; for example, cffile.clientDirectory. Status parameters can be used anywhere other ColdFusion parameters can be used. The upload parameters include the following:
Initial name ColdFusion used when attempting to save a file.
Directory location of the file uploaded from the client's system.
Name of the file uploaded from the client's system.
Extension of the uploaded file on the client system.
Name of the uploaded file on the client system.
MIME content subtype of the saved file.
MIME content type of the saved file.
Date and time the uploaded file was last accessed.
Whether the file already existed with the same path.
Size of the uploaded file.
Whether ColdFusion appended an uploaded file to a file.
Whether ColdFusion overwrote a file.
Whether the uploaded file was renamed to avoid a name conflict.
Whether ColdFusion saved a file.
Size of the file that was overwritten during the file upload operation.
Directory of the file saved on the server.
Filename of the file saved on the server.
Extension of the uploaded file on the server.
Name of the uploaded file on the server.
Time the uploaded file was created.
Date and time of the last modification to the uploaded file.