Huploadify icon indicating copy to clipboard operation
Huploadify copied to clipboard

文件第一次上传提示大小超过限制,第二次再上传同一文件无法再次提示(已解决)

Open mkforonly opened this issue 8 years ago • 0 comments

var thisFile = files[i]; if(parseInt(formatFileSize(thisFile.size,true))>option.fileSizeLimit){ alert('文件'+thisFile.name+'大小超出限制!'); continue; } tips:此处alert只执行一次 update: 1.问题来源:第二次上传同一文件时,type file 的onchange事件不执行。 2.我的解决方案: 当提示错误后清空对应的隐藏域的值,让type file的onchange可以执行: if(parseInt(formatFileSize(thisFile.size,true))>option.fileSizeLimit){ alert('文件'+thisFile.name+'大小超出限制!'); //update:提示错误后清空该隐藏域的值 _this.find('.selectbtn').val(""); continue; }

mkforonly avatar Sep 18 '16 06:09 mkforonly