jQuery FileUpload doesn't trigger 'done'

后端 未结 7 920
陌清茗
陌清茗 2020-12-10 11:04

I use jQuery-File-Upload plugin. I wrote a simple code to test it - and it works, but not without problems. It doesn\'t trigger done, even if the file is upload

7条回答
  •  一个人的身影
    2020-12-10 11:27

    I changed couple of things and it works. Here:

    $('#file_file').fileupload({
        autoUpload: true,
        add: function (e, data) {
            $('body').append('

    Uploading...

    ') data.submit(); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $('#progress .bar').css( 'width', progress + '%' ); }, done: function (e, data) { $('.upl').remove(); $.each(data.files, function (index, file) { /**/ }); } });

提交回复
热议问题