Feat 사진 업로드 기능 구현 - #145
Merged
Hidden character warning
The head ref may contain hidden characters: "feat-\uc0ac\uc9c4-\uc5c5\ub85c\ub4dc-\uae30\ub2a5-\uad6c\ud604"
Merged
Conversation
Closed
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
Walkthrough모집글 작성 시 이미지 업로드 기능을 구현하였습니다. PreSignedUrlService API를 확장하여 저장소 경로 구분(프로필/게시글)을 지원하며, 새로운 이미지 업로드 엔드포인트, PostImage 엔티티, 이미지 관리 서비스를 추가하고 기존 RecruitingPostService에 이미지 생명주기 관리를 통합했습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ImageUploadController
participant PreSignedUrlService
participant S3
participant ImageUploadController2 as (Response)
Client->>ImageUploadController: POST /post-images/presigned-url<br/>(fileNames: List<String>)
ImageUploadController->>ImageUploadController: 이미지 개수 검증<br/>(최대 2개)
loop 각 파일명
ImageUploadController->>PreSignedUrlService: getPreSignedUrl("post/temp", fileName)
PreSignedUrlService->>S3: 임시 경로용 프리사인 URL 생성
S3-->>PreSignedUrlService: preSigned URL
PreSignedUrlService-->>ImageUploadController: PreSignedUrlResponseDto
end
ImageUploadController-->>ImageUploadController2: List<PreSignedUrlResponseDto>
ImageUploadController2-->>Client: ApiResponse(200 OK)
sequenceDiagram
participant Client
participant RecruitingPostController
participant RecruitingPostService
participant PostImageService
participant PreSignedUrlService
participant PostImageRepository
participant S3
Client->>RecruitingPostController: POST /recruiting-posts<br/>(dto with imageKeys)
RecruitingPostController->>RecruitingPostService: createPost(dto)
RecruitingPostService->>RecruitingPostService: 게시글 엔티티 생성 및 저장
RecruitingPostService->>PostImageService: saveImages(post, imageKeys)
loop 각 imageKey
PostImageService->>PreSignedUrlService: moveTempImageToPost(key, postId)
PreSignedUrlService->>S3: 임시 경로에서 최종 경로로 복사<br/>(post/{postId}/{filename})
S3->>S3: 원본 임시 파일 삭제
PreSignedUrlService-->>PostImageService: 최종 objectKey
PostImageService->>PostImageRepository: PostImage 엔티티 저장<br/>(objectKey, imageOrder)
PostImageRepository-->>PostImageService: 저장 완료
end
PostImageService-->>RecruitingPostService: 이미지 저장 완료
RecruitingPostService-->>Client: RecruitingPostCreateResponseDto
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
📝작업 내용
스크린샷 (선택)
💬리뷰 요구사항(선택)
Summary by CodeRabbit
릴리스 노트