Skip to content

Conversation

@modzivv
Copy link
Member

@modzivv modzivv commented Aug 9, 2025

📝 Description

리뷰 이미지 업로드 로직을 로컬 저장소에서 S3 저장 방식으로 전환

Fixes #115

⚙️ Type

  • 기능 추가 (새로운 API, 서비스 로직 등)
  • 버그 수정 (예외 처리, 동작 오류 등)
  • 리팩토링 (코드 정리, 로직 개선 등)
  • 문서 수정 (README, Swagger, 주석 등)
  • 테스트 코드 추가/수정
  • 의존성 추가/수정

📂 Summary of Changes

  • src/s3.upload.js: deleteFromS3 유틸리티 함수 추가
  • src/review/controller/review.controller.js: 업로드 실패 예외 처리 추가
  • src/review/service/review.service.js: S3 업로드로 변경 및 삭제 처리 추가, 이미지 형식 검증 추가

👀 To Reviewer

테스트 결과

구분 내용
포스트맨 응답 image
S3 업로드 확인 https://mycommit-bucket.s3.ap-northeast-2.amazonaws.com/reviews/1754726284802_f14d0571-bc18-4a24-8875-987f080b861a.jpg
  • 건우님(@bkw535)께서 작업해 주신 uploadToS3() 업로드 유틸리티 함수를 사용하였으며, 퍼블릭 URL에서 Key 값을 추출한 뒤 S3에서 해당 객체를 삭제하는 deleteFromS3() 유틸리티 함수를 추가하였습니다!
  • 이미지 업로드 API를 사용하는 시점에는 DB에 저장하지 않고 URL만 반환하고, 리뷰 작성/수정 시점에만 DB에 저장되는 기존 플로우는 그대로 유지했습니다!
  • 확장자명 (.jpg|.jpeg) 표기 차이는 따로 변환하지 않고 그대로 두었습니다

✅ PR Checklist

  • 커밋 메시지 컨벤션을 준수했습니다.
  • 코드 컨벤션을 준수했습니다.
  • 기능이 정상 동작하는지 테스트했습니다.
  • Swagger 문서를 최신 상태로 반영했습니다. (필요 시)

@modzivv modzivv linked an issue Aug 9, 2025 that may be closed by this pull request
2 tasks
@modzivv modzivv self-assigned this Aug 9, 2025
@modzivv modzivv added the enhancement New feature or request label Aug 9, 2025
Copy link
Collaborator

@bkw535 bkw535 left a comment

Choose a reason for hiding this comment

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

확인했습니다!

Copy link
Collaborator

@weejee12 weejee12 left a comment

Choose a reason for hiding this comment

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

확인했습니다~

@modzivv modzivv merged commit 6fd8668 into develop Aug 9, 2025
1 check passed
@modzivv modzivv deleted the feat/115-s3-upload branch August 9, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 리뷰 이미지 업로드 AWS S3 방식으로 변경

4 participants