Send custom data with dropzone.js on each File Upload

前端 未结 4 1404
孤独总比滥情好
孤独总比滥情好 2020-12-23 19:38

I am using dropzone in my Code Igniter Project.

With every drag of a file, dropzone creates an ajax request and my files is getting stored on the server too. But now

4条回答
  •  渐次进展
    2020-12-23 20:15

    I got it. This is what I had to use

    myDropzone.on('sending', function(file, xhr, formData){
        formData.append('userName', 'bob');
    });
    

提交回复
热议问题