User Guide

Table Of Contents
1004 Chapter 41: Managing Files on the Server
Note: Consider the security and logical structure of directories on the server before allowing users
access to them. You can disable the
cffile tag in the ColdFusion MX Administrator. Also, to access
files that are not located on the local ColdFusion MX system, ColdFusion services must run using an
account with permission to access the remote files and directories.
Uploading files
File uploading requires that you create two files:
An HTML form to specify file upload information
An action page containing the file upload code
The following procedures describe how to create these files.
To create an HTML file to specify file upload information:
1.
Create a ColdFusion page with the following content:
<head><title>Specify File to Upload</title></head>
<body>
<h2>Specify File to Upload</h2>
<!--- the action attribute is the name of the action page --->
<form action="uploadfileaction.cfm"
enctype="multipart/form-data"
method="post">
<p>Enter the complete path and filename of the file to upload:
<input type="file"
name="FiletoUpload"
size="45">
</p>
<input type="submit"
value="Upload">
</form>
</body>
2.
Save the file as uploadfileform.cfm in the myapps directory under your web_root and view it in
the browser.
Note: The form will not work until you write an action page for it (see the next procedure).