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)); }