Progress bars for multiple file upload

31 views
Skip to first unread message

Steve James

unread,
Apr 23, 2015, 2:05:22 PM4/23/15
to jquery-f...@googlegroups.com
First of all, thank you for this *awesome* set of code.   I was having nothing but headaches before using a flash based uploader for my 300,000+ user base, and now the silence (lack of complaints and support issues) is bliss.  :-)

With that in mind, I have been working to get progress bars working.  I am only using the jquery.fileupload.js and jquery.iframe-transport.js components at this time, since I have my own user interface code. 

I do have a progress bar that shows up and works fine for a single file upload, but if I select multiple files for upload, I only get the progress bar for the first file uploaded.

I am just using a nested div (class name is bar) that I color the background in for the progress bar.  I have specified a very simple event handler for the progress event:

  submit:  function(e,data){
   jQuery
('#progress').show();
 
},
  progress
: function (e, data) {
   jQuery
('#progress .bar').css('width', parseInt(data.loaded / data.total * 100, 10) + '%');
 
},
  always
: function(e, data){
 
... (Screen update code) ...
  jQuery
('#progress').fadeOut("slow");
 
}
 

What do I need to do differently to show progress for each individual file in a multiple file upload?
Reply all
Reply to author
Forward
0 new messages