Skip to content

[Fix/#519] 공연 상세이미지 업로드 이슈 해결 - #520

Merged
imddoy merged 2 commits into
developfrom
fix/#519
Jun 5, 2026
Merged

imddoy merged 2 commits into
developfrom
fix/#519

Conversation

@imddoy

@imddoy imddoy commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

📌 관련 이슈번호

🎟️ PR 유형

어떤 변경 사항이 있나요?

  • 새 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 리팩토링

✅ Key Changes

이번 PR에서 작업한 내용을 간략히 설명해주세요

  1. 작업 내용

📢 To Reviewers

📸 스크린샷

🔗 참고 자료

@coderabbitai

coderabbitai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@imddoy, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 45 minutes and 18 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7c78431-50e9-49ff-b5af-156f14d4ba2c

📥 Commits

Reviewing files that changed from the base of the PR and between f07413b and be93647.

📒 Files selected for processing (1)
  • src/pages/register/Register.tsx

워크스루

Register.tsx의 공연 등록 완료 흐름에서 S3 업로드 로직을 재구성했습니다. Presigned URL 기반 순차 업로드 헬퍼(uploadFileToS3)를 추가하고, handleComplete에서 이를 사용하여 포스터, 캐스트, 스태프, 상세이미지를 순차적으로 업로드한 뒤 결과 URL을 formData에 주입하는 방식으로 변경했습니다.

변경 사항

공연 등록 S3 업로드 플로우

레이어 / 파일(들) 요약
S3 업로드 헬퍼 함수
src/pages/register/Register.tsx
uploadFileToS3(presignedUrl, localUrl) 헬퍼를 추가하여 로컬 URL을 fetch로 blob으로 변환한 뒤 File 객체 생성 후 mutateAsync를 통해 S3에 업로드합니다.
공연 등록 완료 핸들러 재구성
src/pages/register/Register.tsx
handleComplete에서 refetch() 성공 후 presigned 데이터를 Object.values로 분해하고, uploadFileToS3로 포스터→캐스트→스태프→상세이미지를 순차 업로드합니다. 각 업로드 결과의 URL을 정제하여 posterImage, castPhoto, staffPhoto, performanceImageList.performanceImage에 주입하며, 업로드 실패 시 alert를 표시합니다.

예상 코드 리뷰 노력

🎯 3 (보통) | ⏱️ ~20분

토끼의 시

토끼 🐰가 S3 도와
사진들을 순서대로 올려보네
presigned URL 분해하고
포스터, 캐스트, 스태프, 상세까지
차근차근 업로드 완성! 🎬✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명에서 '✅ Key Changes' 섹션의 '1. 작업 내용'이 구체적인 내용 없이 비어있습니다. Key Changes 섹션에 구체적인 변경 사항을 작성하세요. 요약본에 따르면 S3 업로드 흐름 재구성, 순차적 업로드, 에러 처리 개선 등의 내용이 있으므로 이를 상세히 기술해주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 버그 수정 대상(이슈 #519)과 주요 변경사항(공연 상세이미지 업로드 문제 해결)을 명확하게 요약하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#519

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added 🐛 BUG 버그를 고친 경우 ✨ FEAT 기능 구현 labels Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

PR 작성하느라 고생 많았어요!! 라벨 잘 지정되었는지 확인 한 번 해 주기 🫶

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/register/Register.tsx`:
- Around line 230-235: The performance image upload is still parallel due to
Promise.all; change the logic in the Register component where performanceUrls is
built (currently using gigInfo.performanceImageList, performancePresigned and
uploadFileToS3) to run sequentially: iterate over gigInfo.performanceImageList
with a for...of or for loop, await uploadFileToS3 for each item using the
corresponding performancePresigned[index], then push
performancePresigned[index].split("?")[0] into an array and assign that array to
performanceUrls after the loop.
- Around line 197-205: The refetch() result can be successful but return null
payloads, so update the early-return to check both success and presence of data
(e.g., change the guard to if (!isSuccess || !data) and show a user-facing
error/notification instead of silently returning), and avoid calling
Object.values on possibly-null paths by null-checking each presigned group
(data.poster, data.cast, data.staff, data.performance) before using
Object.values (or use optional chaining) so the upload try/catch doesn't throw
on missing presigned responses; reference the refetch call and the
data.poster/data.cast/data.staff/data.performance usages when making the
changes.
- Around line 186-190: The S3 upload path in uploadFileToS3 currently ignores
failures because uploadToS3 (backed by putS3ImageUpload) can return null on PUT
failure; update uploadFileToS3 to check the result of await uploadToS3({ url:
presignedUrl, file }) and if the return is falsy or indicates a non-2xx outcome,
immediately throw an error (with context) so callers won't proceed with an
invalid URL; reference the uploadFileToS3 function and the uploadToS3 call to
locate where to add this check and throw.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ba7db446-8f74-415b-b320-cd96dc4b7354

📥 Commits

Reviewing files that changed from the base of the PR and between 2e58be6 and f07413b.

📒 Files selected for processing (1)
  • src/pages/register/Register.tsx

Comment thread src/pages/register/Register.tsx Resolved
Comment thread src/pages/register/Register.tsx Resolved
Comment thread src/pages/register/Register.tsx Resolved
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

@imddoy
imddoy merged commit f109511 into develop Jun 5, 2026
5 of 6 checks passed
@github-project-automation github-project-automation Bot moved this from ✅Todo to 🎉Done in 🌱beat-board Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 BUG 버그를 고친 경우 ✨ FEAT 기능 구현

Projects

Status: 🎉Done

Development

Successfully merging this pull request may close these issues.

[ Bug ] 공연 상세 이미지 업로드 오류 해결

1 participant