MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 824

Developing coldfusion mx applications
Table of Contents

Advertisement

1 = execute
You enter permissions values in the
in that order. For example, use the following code to assign read permissions for everyone:
mode=444
To give a file or directory owner read/write/execute permissions and read only permissions for
everyone else:
mode=744
Evaluating the results of a file upload
After a file upload is completed, you can retrieve status information using file upload status
variables. This status information includes data about the file, such as its name and the directory
where it was saved.
You can access file upload status variables using dot notation, using either file.varname or
cffile.varname. Although you can use either the File or cffile prefix for file upload status variables,
cffile is preferred; for example, cffile.ClientDirectory. The File prefix is retained for backward
compatibility.
Note: File status variables are read-only. They are set to the results of the most recent cffile
operation. If two
cffile
cffile operation.
The following table describes the file upload status variables that are available after an upload:
Variable
attemptedServerFile
clientDirectory
clientFile
clientFileName
clientFileExt
contentType
contentSubType
dateLastAccessed
fileExisted
fileSize
fileWasAppended
fileWasOverwritten
fileWasRenamed
824
Chapter 37: Managing Files on the Server
attribute for each type of user: owner, group, and other
mode
tags execute, the results of the first are overwritten by the subsequent
Description
Initial name that ColdFusion uses when attempting to save a file; for
example, myfile.txt. (see
Directory on the client's system from which the file was uploaded.
Full name of the source file on the client's system with the file extension;
for example, myfile.txt.
Name of the source file on the client's system without an extension; for
example, myfile.
Extension of the source file on the client's system without a period; for
example, txt (not .txt).
MIME content type of the saved file; for example,
MIME content subtype of the saved file; for example,
Date that the uploaded file was last accessed.
Indicates (Yes or No) whether the file already existed with the same path.
Size of the uploaded file.
Indicates (Yes or No) whether ColdFusion appended the uploaded file to
an existing file.
Indicates (Yes or No) whether ColdFusion overwrote a file.
Indicates (Yes or No) whether the uploaded file was renamed to avoid a
name conflict.
"Resolving conflicting filenames" on page
822).
for
.
image
image/gif
for
.
gif
image/gif

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents