Skip to content

Conversation

@NCookies
Copy link
Collaborator

@NCookies NCookies commented Dec 29, 2025

Summary by CodeRabbit

  • 설정 변경
    • 파일 업로드 관련 서버 설정이 업데이트되었습니다.
    • 멀티파트 요청의 최대 허용 크기가 기존 5MB에서 10MB로 상향 조정되었습니다.
    • Tomcat의 요청 수용 한도가 무제한(-1)으로 설정되어 더 큰 요청도 수신될 수 있습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

문제:
- 1MB 이상 이미지 업로드 시 413 에러 발생
  - 원래 의도는 5MB 이상 이미지일 때만 에러 처리
- Spring Boot 기본 multipart 제한(1MB)으로 인해 백엔드 도달 전 차단
- 커스텀 에러 메시지 미제공

해결:
- application.properties에 multipart 설정 추가
@NCookies NCookies self-assigned this Dec 29, 2025
@NCookies NCookies added the bug Something isn't working label Dec 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

src/main/resources/application.properties에서 multipart 관련 설정이 변경되었습니다: spring.servlet.multipart.max-request-size를 10MB로 상향하고, server.tomcat.max-swallow-size=-1을 추가했습니다.

Changes

Cohort / File(s) 변경 요약
파일 업로드 설정
src/main/resources/application.properties
spring.servlet.multipart.max-request-size를 10MB로 상향(이전 값 대비 증가). server.tomcat.max-swallow-size=-1 추가(요청 바디 스왈로우 크기 무제한).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • minjee2758
  • chat26666
  • pokerbearkr

Poem

🐰 작은 당근 주머니에 넣던 파일들,
이제 숨통 트여 더 멀리 가네,
요청은 넉넉히, 토마토(톰캇)는 자유로이,
경쾌히 폴더로 깡충깡충 — 업로드 축하해! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 서버 요청 용량 수정이라는 실제 변경 내용과 관련이 있으며, 멀티파트 업로드 크기 제한을 증가시키는 PR의 주요 목적을 반영합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd461db and 02f46a4.

📒 Files selected for processing (1)
  • src/main/resources/application.properties

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NCookies NCookies merged commit ce9d1fe into dev Dec 29, 2025
1 check passed
@NCookies NCookies deleted the fix/upload-image-max-size branch December 29, 2025 11:03
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/main/resources/application.properties (2)

194-194: spring.servlet.multipart.enabled=true 설정은 중복될 수 있습니다.

Spring Boot는 기본적으로 멀티파트 지원을 활성화하므로, 이 속성은 명시할 필요가 없을 수 있습니다. 필요한 경우가 아니면 제거하는 것을 고려하세요.


190-196: 설정값에 대한 설명이나 문맥 추가를 권장합니다.

현재 설정이 이슈 #205를 해결하기 위한 것임을 명확히 하기 위해, 5MB와 10MB 제한값을 선택한 이유를 간단한 주석으로 추가하면 향후 유지보수 시 도움이 될 것입니다.

  # ========================
  # Multipart File Upload
  # ========================
+ # 이슈 #205: 멀티파트 업로드 크기 제한 설정 (#205 참고)
  server.tomcat.max-swallow-size=-1
  spring.servlet.multipart.enabled=true
  spring.servlet.multipart.max-file-size=5MB
  spring.servlet.multipart.max-request-size=10MB
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8d1c0dd and fd461db.

📒 Files selected for processing (1)
  • src/main/resources/application.properties
🔇 Additional comments (2)
src/main/resources/application.properties (2)

189-196: 멀티파트 업로드 설정이 PR 목표와 일치합니다.

추가된 설정들이 이슈 #205의 문제(2MB 이상 이미지 거부)를 해결하기 위한 올바른 접근입니다:

  • server.tomcat.max-swallow-size=-1: Tomcat이 요청을 거부하기 전에 Spring이 처리하도록 보장
  • max-file-size=5MB: 명시된 의도(5MB 이상만 거부)와 일치
  • max-request-size=10MB: 멀티파트 오버헤드를 고려한 적절한 크기 비율

189-196: 이 설정의 속성 이름들은 Spring Boot 3.5.0에서 유효하고 최신입니다.

검증 결과, 사용된 모든 속성 이름이 Spring Boot 3.5.0에서 정확하며 더 이상 사용 중인 것으로 확인되었습니다:

  • spring.servlet.multipart.enabled — 멀티파트 지원 활성화
  • spring.servlet.multipart.max-file-size — 파일당 최대 크기 (기본값: 1MB)
  • spring.servlet.multipart.max-request-size — 전체 요청 최대 크기 (기본값: 10MB)
  • server.tomcat.max-swallow-size — Tomcat 요청 본문 최대 크기

이 속성들은 Spring Boot 3.x에서 변경되지 않았으며, 지정된 값(5MB, 10MB, -1)도 모두 유효한 형식입니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants