spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / web / dev / upload / html file

HTML File Upload

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


Uploading Images using HTML and ASP

In which we discover the hidden wonders of HTML file uploads.

The HTML file upload form element is standard, but vastly underused. It allows you to create forms that can send entire files to your Web server. As a visitor it appears as just another part of just another form. You click on the file upload button to choose a file. When you submit the form the file is posted along with the rest of the form data.

Like so many useful elements of HTML, file upload was not supported in Internet Explorer 3.0 but was soon afterwards added in version 3.02. It is available in Netscape Navigator from version 2.02 onwards.

So what does it look like? Well check out the (non-functional) form below - pretty much like any other form element except that you can use the browse button to choose files.

Enter Some Text:

Choose a File:


What about the code? Well again, pretty much like any other piece of form HTML. Here's the code for the above.

<form method="post" action="photoupload.asp" name="submit" enctype="multipart/form-data">

Enter Some Text: <input type="text" name="textfield"><br><br>

Choose A File: <input type="file" name="filefield"><br><br>

<input type="submit" name="su bmit" value="submit"><br>

</form>

There are only a couple of real differences. The input type of the file upload is 'file' rather than 'text.' The 'enctype' of the form is 'multipart/form-data' - about which more of later.


Comments are welcome

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

Created: Aug. 19, 1999
Revised: Aug. 19, 1999

URL: http://webreference.com/dev/upload/htmlfile.html