Harvard Extension School
CSCI E-12 Fundamentals of Web Site Development | Spring 2020

## File Upload

With file uploads, the `enctype` of the form needs to be `multipart/form-data`

Example 3.14 - File Upload - Example 3.14

- Markup
- Display

    <form method="post" enctype="multipart/form-data" action="https://cscie12.dce.harvard.edu/echo">
    Upload two files:<br/>
    <input type="file" name="file1"/><br/>
    <input type="file" name="file2"/><br/>
    <input type="submit" name="action" value="Upload"/>
    </form>

Upload two files:

Copyright © David Heitmeyer