Inserting file-upload fields

Inserting file-upload fields

You can create a file-upload field that lets users select a file on their computer--such as a word processing document or graphics file--and upload the file to the server. A file field looks like other text fields except it also contains a Browse button. The user either manually enters the path to the file they want to upload, or uses the Browse button to locate and select the file.

Before you can use file-upload fields, you need a server-side script or a page capable of handling file submissions. Consult the documentation of the server technology you use to process form data. For example, if you use PHP, see "Handling files uploads" in the PHP Manual at

File fields require that you use the POST method to transmit files from the browser to the server. The file is posted to the address you specify in the form’s Action text box.

To create a file field in a form:

  1. Insert a form in the page (Insert > Form).
  2. Select the form to display its Property inspector.
  3. Set the form Method to POST.
  4. From the Enctype pop-up menu, select multipart/form-data.
  5. In the Action text box, specify the server-side script or page capable of handling the uploaded file.
  6. Place the insertion point inside the form outline and select Insert > Form > File Field.

    A file field is inserted within the form.

  7. In the Property inspector, set the file field properties as desired.

    For more information, see Setting file field properties.

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly