Adobe COLDFUSION 9 Manual page 1253

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
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
execute, the results of the first are overwritten by the subsequent
The following table describes the file upload status variables that are available after an upload:
Variable
attemptedServerFile
clientDirectory
clientFile
clientFileExt
clientFileName
contentType
contentSubType
dateLastAccessed
fileExisted
fileSize
fileWasAppended
fileWasOverwritten
fileWasRenamed
fileWasSaved
oldFileSize
serverDirectory
serverFile
serverFileExt
serverFileName
timeCreated
timeLastModified
Moving, renaming, copying, and deleting server files
With the cffile tag, you can create application pages to manage files on your web server. You can use the tag to move
files from one directory to another, rename files, copy a file, or delete a file.
The examples in the following table show static values for many of the attributes. However, the value of all or part of
any attribute in a
tag can be a dynamic parameter.
cffile
cffile
Description
Initial name that ColdFusion uses when attempting to save a file; for example, myfile.txt. (see
"Resolving conflicting
filenames" on page 1246).
Directory on the client system from which the file was uploaded.
Full name of the source file on the client system with the filename extension; for example,
myfile.txt.
Extension of the source file on the client system without a period; for example, txt (not .txt).
Name of the source file on the client system without an extension; for example, myfile.
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 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.
Indicates (Yes or No) whether ColdFusion saved the uploaded file.
Size of the file that was overwritten in the file upload operation. Empty if no file was overwritten.
Directory where the file was saved on the server.
Full name of the file saved on the server with the filename extension; for example, myfile.txt.
Extension of the file saved on the server without a period; for example, txt (not .txt).
Name of the file saved on the server without an extension; for example, myfile.
Date and time the uploaded file was created.
Date and time of the last modification to the uploaded file.
Last updated 8/5/2010
operation. If two cffile tags
cffile
operation.
image
for
image/gif
.
for
.
gif
image/gif
1248

Advertisement

Table of Contents
loading

Table of Contents