Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-87

[fileupload] Show progress bar when uploading

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 Final
    • Fix Version/s: 1.2
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Bugzilla Id:
      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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duarthur@yahoo.com Qiang Du
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: