Sample File Upload Form

This page allows you to upload a file. Note that the script will limit the size of the file to around 50k (so that the server doesn't get swamped with data).

The file upload form looks just like any other form except that:

  1. the form tag must specify the POST method
  2. the form tag must specify an enctype of multipart/form-data
  3. the form must contain an <input type=file> element.
You can do a view source on this document to see all the elements.

The processing of a file upload is exactly like that of ordinary data; just make a call to ReadParse and the data will either be put in %in or some other variable that you specify. If you want to write files to disk (rather than store the data in memory), then you also need to set the variable $cgi_lib'writefiles to indicate the directory where the data should be written. Other variables allow you to further customize the file upload.


Please fill in the file-upload form below

File to upload:
Notes about the file:

to upload the file!

Steven E. Brenner / cgi-lib@pobox.com
$Date: 1996/07/31 16:45:47 $