>From the documentation
Evaluating the results of a file upload
After a file upload is completed, you can retrieve status information using
file upload parameters. 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. File upload status parameters use the "File " prefix, for example,
File.ClientDirectory. The file status parameters can be used anywhere other
ColdFusion parameters can be used.
The following file upload status parameters are available after an upload.
File Upload Parameters
Parameter Description
AttemptedServerFile Initial name ColdFusion used attempting to save a file,
for example, myfile.txt.
ClientDirectory Directory location of the file uploaded from the client's
system.
ClientFile Name of the file uploaded from the client's system.
ClientFileExt Extension of the uploaded file on the client's system without
a period, for example, txt not .txt.
ClientFileName Filename without an extension of the uploaded file on the
client's system.
ContentSubType MIME content subtype of the saved file.
ContentType MIME content type of the saved file.
DateLastAccessed Date and time the uploaded file was last accessed.
FileExisted Indicates (Yes or No) whether or not the file already existed
with the same path.
FileSize Size of the uploaded file.
FileWasAppended Indicates (Yes or No) whether or not ColdFusion appended
the uploaded file to an existing file.
FileWasOverwritten Indicates (Yes or No) whether or not ColdFusion
overwrote a file.
FileWasRenamed Indicates (Yes or No) whether or not the uploaded file was
renamed to avoid a name conflict.
FileWasSaved Indicates (Yes or No) whether or not Cold Fusion saved a file.
OldFileSize Size of a file that was overwritten in the file upload
operation.
ServerDirectory Directory of the file actually saved on the server.
ServerFile Filename of the file actually saved on the server.
ServerFileExt Extension of the uploaded file on the server, without a
period, for example, txt not .txt.
ServerFileName Filename, without an extension, of the uploaded file on the
server.
TimeCreated Time the uploaded file was created.
TimeLastModified Date and time of the last modification to the uploaded
file.
Tip Use the File prefix to refer to these parameters, for example,
#File.FileExisted#.
Note File status parameters are read-only. They are set to the results of
the most recent CFFILE operation. (If two CFFILE tags execute, the results
of the first are overwritten by the subsequent CFFILE operation.)
-----Original Message-----
From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 1:03 PM
To: CF-Talk
Subject: Re: CFFILE BTW
by the way: what are the properites I can use for file (after cffile/upload)
I know #file.serverfile#
how can I get a list of them? the documentation says nothing.
THANKS!
----- Original Message -----
From: "Foggy, Doreen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 5:43 PM
Subject: CFFILE
> Error Diagnostic Information
> Error processing CFFILE
> The directory specified in the DESTINATION attribute of the CFFILE tag
> chh-test\www\lmts_int\cic is not valid. The directory either does not
exist
> or is not accessible by the ColdFusion service.
> The error occurred while processing an element with a general identifier
of
> (CFFILE), occupying document position
>
>
> I am using the CFFILE tag for the first time and I am running into some
> problems. Please Help! The directory does exist and I am not sure what
> accessible by the ColdFuison service means. The directory is located on
the
> web server.
> * I have two forms
> * upload.cfm (html form)
> * uploadfile.cfm (action page)
>
> The syntax for both is located below:
>
> Upload.cfm
> <title>WebStar: Contracts Online</title>
> </head>
> <body background="image/background_blue.gif" text="White" link="Silver"
> vlink="Yellow" alink="White">
> <img src="image/file.gif" width="1200" height="50" border="0" alt="">
> <!--- This document was created with Cold Fusion Studio --->
> <FORM ACTION="uploadfile.cfm" ENCTYPE="multipart/form-data"METHOD=POST>
> <table
> border="0">
> <tr>
> <td>File to upload:</td>
> <td>
> <input name="FileName" size=50 type=FILE>
> </td>
> </tr>
> <tr>
> <td>File Destination:</td>
> <td>
> <input type="text" name="FileDestination"
> value="\\chh-test\www\lmts_int\cic" size="50">
> <input type=SUBMIT size=50 value="Upload" name="SUBMIT">
> </td>
> </tr>
> </table>
>
> </FORM>
> </BODY>
> </HTML>
>
> Upload.cfm
> <title>WebStar: Contracts Online</title>
> </head>
> <body background="image/background_blue.gif" text="White" link="Silver"
> vlink="Yellow" alink="White">
> <img src="image/file.gif" width="1200" height="50" border="0" alt="">
> <!--- This document was created with Cold Fusion Studio --->
> <cffile action="UPLOAD"
> filefield="FileName"
> destination="#form.FileDestination#"
> nameconflict="OVERWRITE">
> <CFOUTPUT>
> <CENTER>
> CF 3.1 CFFILE Tag File Upload Demonstration Results - Example 1<P>
> File Upload was Successful! Information about the file is detailed below.
> </CENTER>
> <HR>
> <TABLE>
> <CAPTION><B>File Information</B></CAPTION>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>File
> Name:</TH><TD>#File.ServerDirectory#\#FILE.ServerFile#</TD>
> <TH VALIGN=top ALIGN=LEFT>Content Type:</TH><TD>#File.ContentType#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Content SubType:</TH>
> <TD>#File.ContentSubType#</TD>
> <TH VALIGN=top ALIGN=LEFT>Client Path:</TH>
<TD>#File.ClientDirectory#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Client File:</TH><TD>#File.ClientFile#</TD>
> <TH VALIGN=top ALIGN=LEFT>Client
> FileName:</TH><TD>#File.ClientFileName#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Client
FileExt:</TH><TD>#File.ClientFileExt#</TD>
> <TH VALIGN=top ALIGN=LEFT>Server Path:</TH><TD>#File.ServerDirectory#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Server File:</TH><TD>#File.ServerFile#</TD>
> <TH VALIGN=top ALIGN=LEFT>Server
> FileName:</TH><TD>#File.ServerFileName#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Server
FileExt:</TH><TD>#File.ServerFileExt#</TD>
> <TH VALIGN=top ALIGN=LEFT>Attempted
> ServerFile:</TH><TD>#File.AttemptedServerFile#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>File Existed?</TH><TD>#File.FileExisted#</TD>
> <TH VALIGN=top ALIGN=LEFT>File Was Saved?</TH><TD>#File.FileWasSaved#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>File Was
> Overwritten?</TH><TD>#File.FileWasOverWritten#</TD>
> <TH VALIGN=top ALIGN=LEFT>File Was
> Appended?</TH><TD>#File.FileWasAppended#</TD>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>File Was
> Renamed?</TH><TD>#File.FileWasRenamed#</TD>
> <TH VALIGN=top ALIGN=LEFT>File Size:</TH><TD>#File.Filesize#</TD></TH>
> </TR>
> <TR>
> <TH VALIGN=top ALIGN=LEFT>Old File Size:</TH><TD>#File.OldFileSize#</TD>
> <TH VALIGN=top align=LEFT>Date Last
> Accessed:</TH><TD>#DateFormat(File.DateLastAccessed,'DD MMM YY')#</TD>
> </TR>
> <TR>
> <TH VALIGN=top align=LEFT>Date/Time
> Created:</TH><TD>#DateFormat(File.TimeCreated,'DD MMM YY')#
> #Timeformat(File.TimeCreated,'HH:MM:SS')#</TD>
> <TH VALIGN=top align=LEFT>Date/Time
> Modified:</TH><TD>#DateFormat(File.TimeLastModified,'DD MMM YY')#
> #Timeformat(File.TimeLastModified,'HH:MM:SS')#</TD>
> </TR>
> </TABLE>
> </CFOUTPUT>
> </BODY>
> </HTML>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists