Multiple File Uploads with Progress Meters using Flash 8 and JavaScript
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
:Posted: 2007-09-25 15:57
:Tags: Pylons, Python, Web, Flash
There are two problems with uploading files over the web using a simple HTML Form
* You can only upload one file at once
* You don't get any idea of the upload progress
There are ways of solving these problems using AJAX and a hidden iframe (I might write one up if I get a chance) but Flash 8 provides a better solution because it allows you to select multiple files from a single dialog box so that if you want to upload a hole directory you don't have to select each of the files individually. Flash 8 can also keep track of the upload progress on the client side so you don't need to implement any server-side feedback system as the file is being uploaded. You can also specify a maximum file size.
There are a number of open source implementations which expose this Flash 8 functionality via JavaScript. The one I use is `SWFUpload
Replace contents of a div with links for uploading and browsing, degrades gracefully if flash/javascript isn't accessible