浏览代码

文件大小限制修改

user5 4 年之前
父节点
当前提交
9b765c1e31
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp

+ 2 - 2
src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp

@@ -68,7 +68,7 @@
 				var file = files[i];
 				var fileSize = (file.size/(1024 * 1024)).toFixed(2);
 				if(attachLength !=undefined && attachLength != null && attachLength !='') {
-					if (fileSize > attachLength) {
+					if (parseFloat(fileSize) > parseFloat(attachLength)) {
 						top.layer.msg("上传附件只能上传:" + attachLength + "M以下的文件", {icon: 0});
 						return false;
 					}
@@ -206,4 +206,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>