我对uploadify 有一个问题,它不会自动上传队列中的所有文件。要么我没有正确地将它们添加到队列中,要么我遗漏了一些东西。当我单击上传按钮时,我真的希望将队列中的所有文件都上传,但是每次上传完成时我都必须单击上传按钮。
按钮代码:
<div id="some_file_queue"></div>
<input type="file" name="batchImport" id="batchImport"/>
<input type="button" class="batchImport" value="Upload Files">
javascript:
$("#batchImport").uploadify({
'queueSizeLimit':10,
'queueID':'some_file_queue',
"swf":"/js/uploadify-v3.1/uploadify.swf",
"uploader":"/js/uploadify-v3.1/uploadify.php",
"uploadFolder":"/uploads/",
"auto":false,
"multi":true,
"height":19,
"width":94,
"onUploadError":function(file,errorCode,errorMsg,errorString){
alert("The file " + file.name + " could not be uploaded: " + errorString);
},
"onQueueComplete":function(queueData){
console.log(queueData);
},
"onUploadSuccess":function(file, data, response){
$.ajax({
type:"POST",
data:{
single:1,
file:file,
data:data,
call:'element',
objContainer:$('select[name="objContainer"] option:selected').val()
},
url:"/index.php/upload_handler/handler",
success:function(response){
checkResponse(response);
}
});
}
});
$(document).on("click",".batchImport",function(){
$("#batchImport").uploadifyUpload("*");
});