Evaluating The Results Of A File Upload - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

324
You enter permissions values in the
group, and other 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
variables. This status information includes a wide range of data about the file, such
as the file's name and the directory where it was saved.
Although you can use either the File or cffile prefix, for file uploaded status variables,
cffile is preferred; for example, cffile.ClientDirectory. (The File prefix is retained for
backward compatibility.) You can use the file status variables anywhere that you use
ColdFusion variables.
The following table describes the file status variables that are available after an
upload:
Variable
attemptedServerFile
clientDirectory
clientFile
clientFileName
clientFileExt
contentSubType
contentType
dateLastAccessed
fileExisted
fileSize
Chapter 17 Managing Files on the Server
attribute for each type of user: owner,
mode
Description
Initial name ColdFusion used attempting to save a file, for
example,
myfile.txt
on page 321.
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 subtype of the saved file, such as
.
image/gif
MIME content type of the saved file, such as
image/gif
.
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.
. See "Resolving conflicting filenames"
for
gif
for
image

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents