이미지 업로드 정규화 및 유틸 정리#695
Conversation
…_MIME_TO_EXTS 단일 레지스트리로 통합 - IMAGE_MIME_TO_EXT 삭제 (IMAGE_MIME_TO_EXTS[mime][0] 중복) - getExtensionFromMime: IMAGE_MIME_TO_EXTS[mime][0] 참조로 변경 - toImageInputAccept: exts.some() 로 alias 확장자(jpeg 등) 포함 MIME 매칭 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 공용 함수로 교체 - lesson-qna, qa 페이지 이미지 업로드에 normalizeImageFileForUpload 적용 - qa 페이지 로컬 stripHtml 함수 제거, 공용 유틸로 교체 - feed 페이지도 공용 stripHtml 사용 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 30 minutes and 49 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the 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 have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ 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 |
Problem
QA 답변 이미지 업로드 시
normalizeImageFileForUpload가 적용되지 않아 MIME 타입·확장자가 올바르게 처리되지 않는 문제가 있었습니다.또한
stripHtml이 페이지마다 별도 구현되어 있었고,IMAGE_MIME_TO_EXT/IMAGE_MIME_TO_EXTS두 개의 중복 레지스트리가 공존하고 있었습니다.Solution
normalizeImageFileForUpload적용 (파일 정규화 후 업로드 + preview URL 생성)stripHtml을src/utils/markdown-content-text.ts에 공용 export로 추출, 각 페이지의 로컬 구현 제거IMAGE_MIME_TO_EXT삭제 —IMAGE_MIME_TO_EXTS를 단일 레지스트리로 통합, HEIC 감지 로직 분기 단순화Changes
Bug Fixes
src/app/(landing)/class/[slug]/(learning)/qa/[id]/page.tsxnormalizeImageFileForUpload적용src/components/common/ui/editor/image-utils.tsIMAGE_MIME_TO_EXT제거,IMAGE_MIME_TO_EXTS단일 레지스트리로 통합, HEIC 분기 단순화src/utils/markdown-content-text.tsstripHtml공용 export 추가src/app/(landing)/class/[slug]/(learning)/feed/[id]/page.tsxstripHtml→ 공용 util 교체, 미사용 import 제거src/app/(landing)/class/[slug]/(learning)/qa/[id]/page.tsxstripHtml함수 제거 → 공용 util 사용Result
stripHtml로직이 단일 구현으로 통합되어 동작 일관성 확보IMAGE_MIME_TO_EXT중복 제거로 확장자 레지스트리 유지보수 지점 단일화Test plan
stripHtml적용 결과 확인🤖 Generated with Claude Code