Issue Details (XML | Word | Printable)

Key: FILEUPLOAD-87
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Qiang Du
Votes: 2
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Commons FileUpload

[fileupload] Show progress bar when uploading

Created: 29/Oct/03 01:51 PM   Updated: 09/Mar/07 08:32 PM
Return to search
Component/s: None
Affects Version/s: 1.0 Final
Fix Version/s: 1.2

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All
Issue Links:
Duplicate
 

Bugzilla Id: 24204
Resolution Date: 06/Aug/06 03:12 AM


 Description  « Hide
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!



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.