dropzone upload only one file

前端 未结 6 1303
时光说笑
时光说笑 2021-02-01 02:11

I am using dropzone.js for my drag-drop file upload solution. I want to upload only one file,if i upload second file the first one should be remove and second one should be uplo

6条回答
  •  面向向阳花
    2021-02-01 02:36

    Limiting maxFiles to 1 still allow selecting multiple files in upload dialog. To disallow selecting multiple images in configuration specify following init function:

    maxFiles:1,
    init: function() {
        this.hiddenFileInput.removeAttribute('multiple');
    }  
    

提交回复
热议问题