mirror of https://github.com/elunez/eladmin
限制文件上传大小
parent
4eeabb843b
commit
7bf78d32ba
|
@ -253,7 +253,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
|||
// 1M
|
||||
int len = 1024 * 1024;
|
||||
if (size > (maxSize * len)) {
|
||||
throw new BadRequestException("文件超出规定大小");
|
||||
throw new BadRequestException("文件超出规定大小:" + maxSize + "M");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,5 +122,5 @@ file:
|
|||
path: C:\eladmin\file\
|
||||
avatar: C:\eladmin\avatar\
|
||||
# 文件大小 /M
|
||||
maxSize: 100
|
||||
maxSize: 1
|
||||
avatarMaxSize: 5
|
||||
|
|
Loading…
Reference in New Issue