eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Resources
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak

 

introduction to web programming
File Upload Widget  
One of the little used TYPEs for the <INPUT> tag is the FILE type.

This input widget automatically creates a text field and a "Browse" button that the user can click in order to select a file to upload from their local hard drive.

It then associates the file contents with the NAME defined in the <INPUT> tag.

Below is a basic example. Click on the browse button and see how easy it is to use.

The previous input elements were created with the following code:

    <FORM>
    <INPUT TYPE = "FILE" NAME = "upload_file">
    </FORM>
The input tag also takes an ACCEPT attribute that defines which media types are acceptable for upload. Of course, by default, any type of file can be uploaded.

File handling over HTTP is a little more complex then simple form data and requires an ENCTYPE of multipart/form-data. However, we will discuss handling file uploads tomorrow. For now, you should just familiarize yourself with the input widget.

Previous | Next | Table of Contents