Upload Progress Bar

The upload progress bar is a light-weigth way to track the progress of a long running upload. It is using the mod_uploadprogress plugin from lighttpd 1.5.0 and needs no support by a backend like

The tracking of the progress is handled completely in the core of the web-server and the backend is only called when the upload is finished. It reduces the impact of slow clients which try to upload to your site in parallel and would block a backend-process otherwise.

If you want to integrate this upload progress bar into your own site you need:

A funky version with Yahoo's UI lib


For demonstration purposes we setup a simple HTML page (the one you current see) and added a normal upload form (see below). There is no scripting language used for this demonstration. No Rails, no PHP, nothing.
As we send the content to /dev/null right away we can use a action="/upload.html" as the action-handler of the upload form. A real application would use a script as action-handler which is catching the content and moves it into the right place AFTER the upload is finished successfully.

The upload has a limit of 32MByte. If you want to send more, lighttpd will send HTTP/1.1 413 Request Entity Too Large. If you get a connection reset this is FF way to say, that it got a 413.

the throughput and estimated time is calculated in javascript on the client side.


I'm not a javascript pro. Up to now it seems to work on: