up.removeFile(file)
仅在上传未进行时才有效。
这是一个错误,还是存在我错过的其他一些功能?
This way I could make it work.
Every added files has it own cancel function:
var status_before = file.status;
up.removeFile(file);
if(up.state == plupload.STARTED && status_before == plupload.UPLOADING)
{
up.stop();
up.start();
}
隐藏容器将停止上传。前任 :
var max = 10;
var count = 0;
uploader.bind('FileUploaded', function(up, file, info){
count++;
if (count >= max){
$('#container').hide();
console.log('limit reached');
}
});
显然这是不可能的(还):https ://github.com/moxiecode/plupload/issues/168
如果您只使用特定的传输(HTML5/XHR),您可以通过调用.abort()
XHR 对象来做到这一点。