Javascript 未使用dropzone js在codeigniter中上载多个文件

Javascript 未使用dropzone js在codeigniter中上载多个文件,javascript,php,jquery,codeigniter,Javascript,Php,Jquery,Codeigniter,我用dropzone js上传了多张图片 我的代码如下所示 var s_currency=$('select[name=“currency”]”); Dropzone.autoDiscover=false; 如果($('#dropzoneDragArea')。长度>0){ var expenseDropzone=新Dropzone(“费用表”{ 自动处理队列:false, 可点击:“#dropzoneDragArea”, acceptedFiles:允许的\u文件, PreviewContai

我用dropzone js上传了多张图片

我的代码如下所示

var s_currency=$('select[name=“currency”]”);
Dropzone.autoDiscover=false;
如果($('#dropzoneDragArea')。长度>0){
var expenseDropzone=新Dropzone(“费用表”{
自动处理队列:false,
可点击:“#dropzoneDragArea”,
acceptedFiles:允许的\u文件,
PreviewContainer:“.dropzone预览”,
addRemoveLinks:是的,
//maxFiles:1,
//并行上传:1,
uploadMultiple:true,
dictDefaultMessage:在此处放置文件以上传,
DictFallback消息:浏览器不支持拖放,
dictRemoveFile:删除\u文件,
DictMaxFilesExtered:您不能上传更多文件,
错误:函数(文件、响应){
警报(“危险”,响应);
},
成功:函数(文件、响应){
response=$.parseJSON(response);
this.options.autoProcessQueue=true;
if(this.getUploadingFiles().length==0&&this.getQueuedFiles().length==0){
window.location.assign(response.url);
}
},
});
}
$(文档).ready(函数(){
_验证表格($('form'),{类别:'required',日期:'required',金额:'required',币种:'required',费用提交人];
$('input[name=“billable”]”)。在('change',function()上{
do_bilable_checkbox();
});
});
功能费用提交人(表格){
s_currency.removeAttr(“禁用”);
$('input[name=“billable”]”)。prop('disabled',false);
$.post(form.action,$(form.serialize()).success(函数(响应){
response=$.parseJSON(response);
如果(响应。费用支出){
如果(类型(expenseDropzone)!=‘未定义’){
//log(expenseDropzone.getQueuedFiles().length);返回;
如果(expenseDropzone.getQueuedFiles().length>0){
expenseDropzone.options.url=admin\u url+'expenses/add\u expense\u attachment/'+response.expenseid;
expenseDropzone.processQueue();
}否则{
window.location.assign(response.url);
}
}否则{
window.location.assign(response.url);
}
}否则{
window.location.assign(response.url);
}
});
返回false;
}

在此附上文件
提交