如果出现 maxfilesize、maxfileuploads 等错误,Dropzone autoprocess queue false 不工作
Dropzone autoprocess queue false not working if there is an error like maxfilesize,maxfileuploads etc
当我上传比 dropzone 允许的更大尺寸的图像时,autoprocessqueue 不起作用,如果我上传正确的文件则显示过程已完成,然后它起作用 proper.Following 是我的代码:
Dropzone.options.myAwesomeDropzone =
{
url: 'file-upload.php',
previewsContainer: ".dropzone-previews",
uploadMultiple: true,
parallelUploads: 100,
maxFiles: 100,
maxFilesize: 5,
addRemoveLinks: true,
autoProcessQueue: false,
acceptedFiles:'image/jpg,image/jpeg,image/png',
init: function()
{
thisDropzone = this;
this.on("queuecomplete", function (file) {
alert("all files uploaded successfully");
});
}
}
});
function process_queue()
{
if(thisDropzone.files.length > 0) {
thisDropzone.processQueue()
}
}
如果我上传大文件或除图片以外的其他文件,它会触发警报"all files uploaded successfully"。
this.on("queuecomplete", function (file) {
var size = thisDropzone.files[0].size/1000000;
if(thisDropzone.files[0].type== "image/jpeg" ||thisDropzone.files[0].type=="image/jpg" || thisDropzone.files[0].type=="image/png" && size<5)
listingSubmitted();
});
当我上传比 dropzone 允许的更大尺寸的图像时,autoprocessqueue 不起作用,如果我上传正确的文件则显示过程已完成,然后它起作用 proper.Following 是我的代码:
Dropzone.options.myAwesomeDropzone =
{
url: 'file-upload.php',
previewsContainer: ".dropzone-previews",
uploadMultiple: true,
parallelUploads: 100,
maxFiles: 100,
maxFilesize: 5,
addRemoveLinks: true,
autoProcessQueue: false,
acceptedFiles:'image/jpg,image/jpeg,image/png',
init: function()
{
thisDropzone = this;
this.on("queuecomplete", function (file) {
alert("all files uploaded successfully");
});
}
}
});
function process_queue()
{
if(thisDropzone.files.length > 0) {
thisDropzone.processQueue()
}
}
如果我上传大文件或除图片以外的其他文件,它会触发警报"all files uploaded successfully"。
this.on("queuecomplete", function (file) {
var size = thisDropzone.files[0].size/1000000;
if(thisDropzone.files[0].type== "image/jpeg" ||thisDropzone.files[0].type=="image/jpg" || thisDropzone.files[0].type=="image/png" && size<5)
listingSubmitted();
});