Harvard Extension School, Fall 2018
CSCI E-12 Fundamentals of Web Site Development

## File Upload

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

Example 3.14 - File Upload - Example 3.14 | <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>

- 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