From fc13fbc31c1c21cd13fa70d6483702dc59e0b046 Mon Sep 17 00:00:00 2001 From: wellbeing-dough Date: Fri, 8 Dec 2023 03:40:29 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=9A=A9=EB=9F=89=20=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=2020M?= =?UTF-8?q?B=EB=A1=9C=20=EC=A6=9D=EB=9F=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../studyhubserver/exception/image/ImageSizeException.java | 2 +- .../studyhubserver/user/service/UserImageService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/exception/image/ImageSizeException.java b/src/main/java/kr/co/studyhubinu/studyhubserver/exception/image/ImageSizeException.java index 9023fec5..98368582 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/exception/image/ImageSizeException.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/exception/image/ImageSizeException.java @@ -7,7 +7,7 @@ public class ImageSizeException extends CustomException { private final StatusType status; - private static final String message = "이미지의 크기는 1MB 미만이어야 합니다."; + private static final String message = "이미지의 크기는 20MB 미만이어야 합니다."; public ImageSizeException() { super(message); diff --git a/src/main/java/kr/co/studyhubinu/studyhubserver/user/service/UserImageService.java b/src/main/java/kr/co/studyhubinu/studyhubserver/user/service/UserImageService.java index 20251189..d0a1f30d 100644 --- a/src/main/java/kr/co/studyhubinu/studyhubserver/user/service/UserImageService.java +++ b/src/main/java/kr/co/studyhubinu/studyhubserver/user/service/UserImageService.java @@ -29,7 +29,7 @@ public class UserImageService { public void uploadUserImage(Long userId, MultipartFile multipartFile) throws IOException { UserEntity user = userRepository.findById(userId).orElseThrow(UserNotFoundException::new); - if(multipartFile.getSize() >= 1024 * 1024) { throw new ImageSizeException(); } + if(multipartFile.getSize() >= 20 * 1024 * 1024) { throw new ImageSizeException(); } user.updateImage(saveImage(multipartFile)); }