Commit 422f11f1 authored by daniel's avatar daniel

fix(common): 文件上传处理

parent 7115dad1
......@@ -127,9 +127,9 @@ public class CommonController {
public Result<?> uploadClaimer(@RequestPart @RequestParam("file") MultipartFile file,@RequestParam(value = "gCmptId") Integer gCmptId) {
try {
// 检查文件大小是否超过1MB
long maxFileSize = 1024 * 1024; // 1MB
long maxFileSize = 5 * 1024 * 1024; // 1MB
if (file.getSize() > maxFileSize) {
return Result.fail().setMsg("上传文件大小不能超过1MB");
return Result.fail().setMsg("上传文件大小不能超过5MB");
}
String originalFilename = file.getOriginalFilename();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment