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

[fileupload] Show progress bar when uploading

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0 Final
    • 1.2
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: