Open GoogleCodeExporter opened 9 years ago
Ok I found the problem. In jquery.dnd-file-upload.js this line
for ( var i = 0; i < files.length; i++) {
resets index on every file drop and this affects updating and hiding info divs.
I'll post the fix soon.
Original comment by ergecsen...@gmail.com
on 14 Sep 2011 at 11:21
Here is the fix I did for my own project. This issue may be solved with a
better way.
I created counter on page load for my dropzone
$("#dropzone").data("totalfilecount", 0);
then
In this function do
JQ.fn.dropzone.uploadStarted = function (fileIndex, file){
fc = parseInt($("#dropzone").data("totalfilecount"), 10) + 1;
$("#dropzone").data("totalfilecount", fc);
//rest of the code
};
JQ.fn.dropzone.newFilesDropped = function () {
//JQ(".dropzone-info").remove();
return parseInt($("#dropzone").data("totalfilecount"), 10);
};
In jquery.dnd-file-upload.js edit uploadFiles function like this
function uploadFiles(files) {
var filecount = $.fn.dropzone.newFilesDropped();
for ( var i = 0; i < files.length; i++) {
...
...
...
upload.fileIndex = filecount + i;
...
...
...
$.fn.dropzone.uploadStarted(filecount + i, file);
}
}
Original comment by ergecsen...@gmail.com
on 14 Sep 2011 at 11:31
https://github.com/ergec/dnd-file-upload
Original comment by ergecsen...@gmail.com
on 14 Sep 2011 at 11:54
Original issue reported on code.google.com by
ergecsen...@gmail.com
on 14 Sep 2011 at 10:08