Skip to content

Feat: presigned 이미지 업로드 구현#192

Merged
lunarbae628 merged 10 commits into
stagingfrom
feat/image
Apr 20, 2026
Merged

Feat: presigned 이미지 업로드 구현#192
lunarbae628 merged 10 commits into
stagingfrom
feat/image

Conversation

@lunarbae628
Copy link
Copy Markdown
Collaborator

@lunarbae628 lunarbae628 commented Apr 20, 2026

🛰️ Issue Number

🪐 작업 내용

  • 이미지 업로드 URL 생성 API 추가

    • 문서 소유자 확인
    • 이미지 content type allow-list 검증
    • 이미지 크기 제한 검증
    • users/{userId}/docs/{docId}/images/{uuid}.{ext} 형식의 S3 object key 생성
    • S3 presigned PUT URL 발급
  • 이미지 업로드 완료 API 추가

    • 저장된 이미지 메타데이터 조회
    • S3 HeadObject로 실제 업로드 여부 확인
    • content type / size 불일치 검증
    • 업로드 완료 시 이미지 상태를 ACTIVE로 변경
    • CloudFront 기반 이미지 URL 반환
  • S3 설정 추가

    • S3Presigner
    • S3Client
    • bucket / region / CDN URL / presigned 만료시간 설정
  • 예외 처리 보강

    • 업로드 전 complete 호출 또는 S3 object 미존재 시 IMAGE_UPLOAD_NOT_COMPLETED 반환
    • S3 403, 404를 도메인 예외로 변환
  • 테스트 추가

    • ImageServiceUnitTest
    • presigned URL 생성
    • S3 key prefix 검증
    • invalid content type 검증
    • upload complete 성공 검증
    • S3 object 미존재 예외 변환 검증

📚 Reference

✅ Check List

  • 코드가 정상적으로 컴파일되나요?
  • 테스트 코드를 통과했나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

@lunarbae628 lunarbae628 self-assigned this Apr 20, 2026
@lunarbae628 lunarbae628 added the ✨Feature New feature or request label Apr 20, 2026
@lunarbae628 lunarbae628 merged commit 8b85378 into staging Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant