Jelajahi Sumber

文件大小限制修改

user5 4 tahun lalu
induk
melakukan
9b765c1e31

+ 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>