Dropzone: prevent uploading of duplicate files

前端 未结 4 1029
孤独总比滥情好
孤独总比滥情好 2021-01-04 06:57

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

4条回答
  •  被撕碎了的回忆
    2021-01-04 07:46

    The following solution helped me:

    this.on('addedfile', function(file) {
        setTimeout(function() { 
            $(".dz-file-preview").remove(); // removes all files except images
        }, 3000);
    });
    

提交回复
热议问题