Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0 Final
-
None
-
Operating System: All
Platform: All
-
24204
Description
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.
Thanks!
Attachments
Issue Links
- is duplicated by
-
FILEUPLOAD-97 [fileupload] Upload Progress Reporting
- Closed