Why doesn't Blueimp's jQuery-File-Upload plugin fire callbacks?

前端 未结 5 1896
被撕碎了的回忆
被撕碎了的回忆 2020-12-24 14:55

I\'m experimenting with Blueimp\'s jQuery-File-Upload plugin, which judging by the demo looks very promising.

It\'s really easy to implement:

var $up         


        
5条回答
  •  死守一世寂寞
    2020-12-24 15:18

    If the add event is defined, all the process callbacks will not fire.

    $(function(){
        var fileupload=$('#fileupload').fileupload({
            url: 'fileupload.php',
            dataType: 'json',
            add: function(e, data) {
                data.submit();
            },
        })
        .on('fileuploadprocessalways', function (e, data) {
            //Won't be triggered if add callback is defined
        })
    });
    

提交回复
热议问题