|
@@ -59,8 +59,8 @@ public class FileBaseController {
|
|
String ext = contentType.substring(contentType.lastIndexOf("/") + 1, contentType.length());
|
|
String ext = contentType.substring(contentType.lastIndexOf("/") + 1, contentType.length());
|
|
//如果是图片类型 则验证不允许上传超过2M
|
|
//如果是图片类型 则验证不允许上传超过2M
|
|
if (FileUtil.isAllowUpImg(ext)) {
|
|
if (FileUtil.isAllowUpImg(ext)) {
|
|
- if (!FileUtil.checkFileSize(file.getSize(), 2, "M")) {
|
|
|
|
- throw new ServiceException(SystemErrorCode.E901.code(), "图片超过上传限制大小,请上传2M以内图片");
|
|
|
|
|
|
+ if (!FileUtil.checkFileSize(file.getSize(), 5, "M")) {
|
|
|
|
+ throw new ServiceException(SystemErrorCode.E901.code(), "图片超过上传限制大小,请上传5M以内图片");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!FileUtil.isAllowUpFile(ext)) {
|
|
if (!FileUtil.isAllowUpFile(ext)) {
|