I am using Dropzone. I\'d like to prevent the uploading of a file which already exists as thumbnail in Dropzone \"panel\". With uploading I mean not to allow a file with the
Add these simple lines of code:
myDropzone.on("addedfile", function(file) {
if (this.files.length) {
var _i, _len;
for (_i = 0, _len = this.files.length; _i < _len - 1; _i++) // -1 to exclude current file
{
if(this.files[_i].name === file.name && this.files[_i].size === file.size && this.files[_i].lastModifiedDate.toString() === file.lastModifiedDate.toString())
{
this.removeFile(file);
}
}
}
});