Affects Version/s: 1.0 Final
Fix Version/s: 1.2
Operating System: All
In order to show progress bar when uploading in the browser, we need to know
how many bytes of data have been received. But now we can't get it
before "parseRequest" is finished.
I think this problem can be solved by adding a listener.
1. Define a class "Listener", it has two attributes, "BytesTotal","BytesDone",
or others such as "BytesPerSecond".
2. After new DiskFileUpload, register a "Listener" object into it.
3. In Class "MultipartStream", when executing "input.read", updating
the "ByteDone" in "Listener"
so by checking the "Listener", we can know how many bytes have been received
when uploading. I will put the "Listener" object in session, and get it from
another JSP or Servlet, show the progress bar.