문제 상황
파일 업로드시 디폴트로 설정된 용량 제한에 따른 에러 발생
multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException: The field sourceFile exceeds its maximum permitted size
해결 방법
application.yml
용량 설정 추가해주면 해결됩니다.
spring:
servlet:
multipart:
maxFileSize : 5MB
maxRequestSize : 15MB
maxFileSize : 파일당 최대 용량 설정
maxRequestSize : 요청된 전체 파일의 용량의 합 설정
'프로그래밍 > JPA Project - sparta' 카테고리의 다른 글
| springboot 배포 timezone 동기화 문제 해결 방법 (0) | 2022.07.25 |
|---|---|
| 가비아 도메인 연결 - Route53 (0) | 2022.07.19 |
| 카페 평균 평점 추가 (0) | 2022.07.18 |
| 리뷰를 등록한 유저는 추가 등록 불가 처리 (0) | 2022.07.18 |
| 카페 삭제 기능 세부기능 추가 및 리팩토링 (0) | 2022.07.18 |