Skip to content

[fix/#417] OCI 이미지 PAR URL 저장 문제 수정 및 presigned URL 응답 개선 - #416

Merged
2ghrms merged 7 commits into
Clokey-dev:developfrom
2ghrms:oci-migration
Jun 14, 2026
Merged

[fix/#417] OCI 이미지 PAR URL 저장 문제 수정 및 presigned URL 응답 개선#416
2ghrms merged 7 commits into
Clokey-dev:developfrom
2ghrms:oci-migration

Conversation

@2ghrms

@2ghrms 2ghrms commented Jun 14, 2026

Copy link
Copy Markdown
Member

📌 연관 이슈

  • close #이슈번호

🌱 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 디코딩 지원
  • MD5 파라미터 기반 createPresignedUrl 제거, 단일 createPresignedUrl(ImageType, memberId, extension)로 통합
  • PresignedUrlResult record 추가

Presigned URL API

  • ClothImagesPresignedUrlResponse, HistoryImagesPresignedUrlResponseobjectUrls 필드 추가
  • urls: 업로드용 PAR URL (기존과 동일)
  • objectUrls: DB 저장·조회용 공개 객체 URL (신규)

도메인별 URL 정규화 (toPublicObjectUrl)

  • cloth: 생성·수정 시 clothImageUrl 정규화
  • history: 생성·수정 시 imageUrl 정규화
  • member: 프로필 수정 시 profileImageUrl 정규화
  • coordinate: 생성·수정 시 coordinateImageUrl 정규화
  • cloth AI: AI 업로드 결과 URL 정규화

Notification

  • 기온 알림 아이콘 URL 하드코딩(prod bucket) 제거
  • icon/temperature/temperature_icon.jpeg object key + buildPublicObjectUrl() 사용 (dev/prod bucket 분리 대응)

Test

  • TestObjectStorageConfig: mock ObjectStorageClient.getEndpoint() stub 추가
  • presigned URL 응답·createPresignedUrl 시그니처 변경에 맞게 테스트 수정

📸 스크린샷

❗️리뷰어들께

2ghrms added 6 commits June 12, 2026 22:32
- 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을 추가한다.
@2ghrms 2ghrms self-assigned this Jun 14, 2026
@2ghrms 2ghrms changed the title fix: OCI 이미지 PAR URL 저장 문제 수정 및 presigned URL 응답 개선 [fix/#417] OCI 이미지 PAR URL 저장 문제 수정 및 presigned URL 응답 개선 Jun 14, 2026
@2ghrms
2ghrms merged commit 7ce06d6 into Clokey-dev:develop Jun 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant