Personal tools
Home Webmaster Resources HTML Uploading a File with HTML

Uploading a File with HTML

Using HTML to offer file upload capabilities to your users is very simple.  The real work is on the server side, where you will have to retrieve that file from a temporary folder, then move it to the folder where it is supposed to be.

The HTML code to display a file upload box to the user is as follows.  Be sure to specify the enctype attribute of the form tag.  This lets the browser know that it isn't just accepting regular form data, but that a file is being uploaded.

<form action="upload.xxx" enctype="multipart/form-data" method="post">
    <input type="text" name="comments" />
    <input type="file" name="upload_file" />
    <input type="submit" value="Upload" />
</form>

Need assistance with your project? Universal Web Services can help.
Contact us to request a quote.