commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24204] New: - Show progress bar when uploading
Date Wed, 29 Oct 2003 05:51:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24204>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24204

Show progress bar when uploading

           Summary: Show progress bar when uploading
           Product: Commons
           Version: 1.0 Final
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: Other
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: duarthur@yahoo.com


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!

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message