[fix/#417] OCI 이미지 PAR URL 저장 문제 수정 및 presigned URL 응답 개선 - #416
Merged
Conversation
- PAR URL은 업로드용, /n/.../o/... 공개 URL은 저장·조회용으로 생성 - PAR URL 파싱·정규화 및 MD5 기반 presigned URL 생성 로직을 제거
- 클라이언트가 PAR URL로 업로드하고 공개 객체 URL을 DB에 저장 - cloth/history presigned URL 응답과 발급 로직을 수정
- cloth, history, member, coordinate 및 AI 업로드 결과에서 만료되는 PAR URL 대신 조회 가능한 OCI 공개 URL이 DB에 저장되도록 한다.
- objectUrls 응답 필드와 createPresignedUrl 시그니처 변경을 반영하고 테스트용 ObjectStorageClient endpoint stub을 추가한다.
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.
📌 연관 이슈
🌱 PR 요약
OCI Object Storage 이미지 URL을 PAR(업로드용)과 공개 객체 URL(조회용)로 분리했습니다.
클라이언트가 PAR URL을 DB에 저장해 이미지가 보이지 않던 문제를, 저장 시 공개 URL로 정규화하고 presigned URL API에
objectUrls를 추가하는 방식으로 해결했습니다.🛠 작업 내용
Infrastructure
StorageUtil: presigned URL 발급 시uploadUrl(PAR) /objectUrl(공개 URL) 분리 반환buildPublicObjectUrl,toPublicObjectUrl추가 — PAR URL → 공개 URL 변환 및 경로%2F인코딩extractObjectKey개선 —/p/PAR URL 파싱 및 URL 디코딩 지원createPresignedUrl제거, 단일createPresignedUrl(ImageType, memberId, extension)로 통합PresignedUrlResultrecord 추가Presigned URL API
ClothImagesPresignedUrlResponse,HistoryImagesPresignedUrlResponse에objectUrls필드 추가urls: 업로드용 PAR URL (기존과 동일)objectUrls: DB 저장·조회용 공개 객체 URL (신규)도메인별 URL 정규화 (
toPublicObjectUrl)clothImageUrl정규화imageUrl정규화profileImageUrl정규화coordinateImageUrl정규화Notification
icon/temperature/temperature_icon.jpegobject key +buildPublicObjectUrl()사용 (dev/prod bucket 분리 대응)Test
TestObjectStorageConfig: mockObjectStorageClient.getEndpoint()stub 추가createPresignedUrl시그니처 변경에 맞게 테스트 수정📸 스크린샷
❗️리뷰어들께