Valums文件上传 - onComplete

时间:2012-07-25 07:26:27

标签: jquery file-upload

我正在使用Valums文件上传插件,并且无法使用onComplete方法/触发器/事件,无论它被调用...它只是永远不会触发。在那里放一个断点,从未发生过。这是我的代码:

jQuery('.btnUploader').each(function (index) {
    var uploader1 = new qq.FileUploader({
        element: jQuery('.btnUploader')[index], // The HTML element to turn into the uploader
        onSubmit: function () {
            var componentId = $(this).attr('element').id;
            var teamId = clbTeams.GetValue();
            uploader1.setParams({
                componentId: componentId,
                teamId: teamId
            });
        },
        onComplete: function (id, filename, responseJSON) {
            alert('test');
        },
        action: getUrl('ControllerUploadHandler', 'TeamStatusSubmit'), // Action method that will handle the upload
        multiple: false, // Single or Mutliple file selection
        allowedExtensions: ['docx', 'jpeg', 'jpg', 'png', 'zip', 'ppt'] // File Type restrictions
    });
});

我相信,那里的功能及其参数出了问题。有人有解决方案吗?

1 个答案:

答案 0 :(得分:0)

一切似乎都没问题。看看服务器的响应。也许有些服务器错误。