How do I display file upload progress using the Dojo ProgressBar?
Author: Deron Eriksson
Description: This tutorial demonstrates how to display the progress of a file upload with a Dojo ProgressBar.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 2.0 (Eclipse 3.3.0) || Dojo 1.0.2
(Continued from page 2)
Now, let's see the ProgressBar in action. I started up the project. I browsed to the BigFile.mp3 and set this as the file to upload. I then clicked the Upload button.
As you can see, when the upload starts, the Upload button gets disabled. The progress is displayed on the DojoSW ProgressBar. Here, the upload is 22% complete. We can also see that this screen capture was taken after about 6 seconds.
When the file upload is done, the TestServlet class displays some information about the upload.
The Dojo ProgressBar is a very visually appealing way to display the status of a task. In this tutorial, we've seen how we can use it to display the status of a file upload.