jQuery-File-Upload
jQuery-File-Upload copied to clipboard
'change' callback works only for add?
Hello! I want to know number of added files. I can do this by incremental own array inside change callback. But It does not work when I cancel some files before upload.
Is there a way of solving the problem?
$('table tbody tr').length
Will give you the number of added files at any time. To avoid reading the wrong table give the table an id.
<table id="uploadtable" role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>
and use
$('#uploadtable tbody tr').length
Please read: https://github.com/blueimp/jQuery-File-Upload#support