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

Developing coldfusion mx applications
Table of Contents

Advertisement

Note: Modern versions of Internet Explorer and Netscape support MIME type associations. Other
browsers and older versions might ignore these associations.
ColdFusion saves any uploaded file if you omit the
restrict the file types, as demonstrated in the following examples.
The following
cffile
<cffile action="Upload"
fileField="Form.FiletoUpload"
destination="c:\uploads\"
nameConflict="Overwrite"
accept="image/gif">
The following
cffile
<cffile action="Upload"
fileField="Form.FiletoUpload"
destination="c:\uploads\"
nameConflict="Overwrite"
accept="image/gif, image/jpeg">
Note: If you receive an error similar to "The MIME type of the uploaded file (image/jpeg) was not
accepted by the server", enter accept="image/jpeg" to accept JPEG files.
This
tag saves any image file, regardless of the format:
cffile
<cffile action="Upload"
fileField="Form.FiletoUpload"
destination="c:\uploads\"
nameConflict="Overwrite"
accept="image/*">
Setting file and directory attributes
In Windows, you specify file attributes using the
specify file or directory permissions using the
Windows
In Windows, you can set the following file attributes:
Hidden
Normal
ReadOnly
To specify several attributes in CFML, use a comma-separated list for the
for example,
attributes="ReadOnly,Hidden"
file's existing attributes are maintained. If you specify any other attributes in addition to Normal,
the additional attribute overrides the Normal setting.
UNIX
In UNIX, you can individually set permissions on files and directories for each of three types of
users—owner, group, and other. You use a number for each user type. This number is the sum of
the numbers for the individual permissions allowed. Values for the
octal values for the UNIX
4 = read
2 = write
tag saves an image file only if it is in the GIF format:
tag saves an image file only if it is in GIF or JPEG format:
command:
chmod
attribute or specify "*/*". You can
accept
cffile
attributes
attribute of the
mode
cffile
. If you do not use the
mode
attribute. In UNIX, you
or
cfdirectory
attribute;
attributes
attribute, the
attributes
attribute correspond to
Using cffile
tag.
823

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents