首页 > 有人解决过uploadify中uploadLimit的BUG吗?

有人解决过uploadify中uploadLimit的BUG吗?

就是我设置uploadLimit = 5 在上传的过程中,我如果取消一个,队列还有4个。 然后我想再上传一个,就会提示说不让上传了。。。 这个BUG有人解决过吗?


我是通过这种方式解决的:
1)首先给cancel事件加一个自己的函数:DeleteCancelFile
'onUploadSuccess': function (file, data, response) {
eval("data=" + data);

            var cancel = $("#" + file.id + " .cancel a");
            if (cancel) {
                cancel.on('click', function () {
                    DeleteCancelFile(file.name);
                });
            }
        }

2)在删除服务器文件后,加上下面2句就可以了,就是每次从服务器删除一个文件,就把uploadLimit + 1:
var swfuploadify = window['uploadify_file_upload'];
$("#file_upload").uploadify('settings', 'uploadLimit', swfuploadify.settings.uploadLimit + 1);


那你就用queueSizeLimit吧,只限制队列里存在文件的数量,不考虑上传的数量。

The maximum number of files that can be in the queue at one time. This does not limit the number of files that can be uploaded. To limit the number of files that can be uploaded, use uploadLimit. If the number of files selected to add to the queue exceeds this limit, the onSelectError event is triggered.

这应该不算BUG,考虑的角度不同而已。

【热门文章】
【热门文章】