Topic: on UploadComplete

I would like to perform the follow actions when all files are upload completed.

1. know the success/fail files uploaded
2. disable Add Files button or all buttons or entire widget.

Currently my finding to trigger upload complete is at

init: {
  UploadComplete: function(up, files) {
  alert('upload complete');

It also works on

$(document.getElementById('uploader')).on("complete", function(event, args) {
alert('on complete');

The codes above are from various places I've found. I got no idea of the use of function var defined like function(up, files) and function(event, args).

All I know is the first var pass to function is the div (uploader) object.

The alert can trigger successful. But I don't know how to capture the uploaded files and disable buttons as stated above.

I have tried to read thru the documentation and look into some js codes, it is still no success.

Any help or hints are very much appreciated. Thanks.

Re: on UploadComplete


Number of files can be identified by

UploadComplete: function(up, files) {

the files.length will return total files uploaded that still appear in the queue list.

I still need help in disable browser or buttons. Thanks.

Re: on UploadComplete

* Update *


This works to disable Add Files button. However, I still able remove the uploaded files in the list and whenever I removed any uploaded file(s), the Add Files button is enabled again and I still can click Start Upload.