From e298caf18fb4de8042b03de82d644bbc0a1ac0e6 Mon Sep 17 00:00:00 2001 From: SeungWoo Ryu Date: Mon, 29 Dec 2025 18:16:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=8B=9C=20413=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 문제: - 1MB 이상 이미지 업로드 시 413 에러 발생 - 원래 의도는 5MB 이상 이미지일 때만 에러 처리 - Spring Boot 기본 multipart 제한(1MB)으로 인해 백엔드 도달 전 차단 - 커스텀 에러 메시지 미제공 해결: - application.properties에 multipart 설정 추가 --- src/main/resources/application.properties | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 938311e2..9612c87c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -186,3 +186,10 @@ management.metrics.enable.jvm=false management.metrics.export.defaults.enabled=false management.metrics.enable.all=false + +# ======================== +# Multipart File Upload +# ======================== +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=5MB +spring.servlet.multipart.max-request-size=5MB From fd461db16572c61b7ec415fc7f14697e60791b68 Mon Sep 17 00:00:00 2001 From: SeungWoo Ryu Date: Mon, 29 Dec 2025 20:01:04 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=9A=A9=EB=9F=89=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9612c87c..89ac3fc7 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -190,6 +190,7 @@ management.metrics.enable.all=false # ======================== # Multipart File Upload # ======================== +server.tomcat.max-swallow-size=-1 spring.servlet.multipart.enabled=true spring.servlet.multipart.max-file-size=5MB -spring.servlet.multipart.max-request-size=5MB +spring.servlet.multipart.max-request-size=10MB