fix : 이미지 업로드 파일 선택 시 Windows에서 썸네일 누락 수정#548
Merged
Conversation
accept 속성에 확장자만 지정되어 Windows Chrome 파일 다이얼로그에서 이미지 썸네일이 정상 생성되지 않던 문제를 MIME 타입 병기로 해결 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 Walkthrough개요
변경사항
관련된 PR
추정 코드 리뷰 난이도🎯 2 (Simple) | ⏱️ ~10 분 시
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
작업 내용
이미지 업로드 파일 선택 다이얼로그에서 Windows Chrome 환경에서 많은 이미지 썸네일이 누락되는 문제를 수정합니다.
변경 이유
<input type="file">의accept속성에 확장자(.jpg,.png,...)만 지정되어 있었습니다.Windows Chrome은 확장자만 있으면 "사용자 저장 파일" 커스텀 필터를 생성하는데, 이 경우 Windows Shell의 이미지 썸네일 생성이 정상 동작하지 않는 경우가 있습니다.
MIME 타입(
image/jpeg,image/png등)을 확장자와 함께 지정하면 Chrome이 OS 수준의 네이티브 이미지 필터를 사용하게 되어 썸네일이 정상 표시됩니다.변경 사항
toImageInputAccept()함수가 기존IMAGE_EXTENSION_BY_MIME맵을 활용하여 MIME 타입을 자동으로 추출하고 확장자 앞에 병기하도록 수정.jpg,.jpeg,.png,.webp,.gif,.heic,.heifimage/jpeg,image/png,image/gif,image/webp,image/heic,image/heif,.jpg,.jpeg,.png,.webp,.gif,.heic,.heif검증 방법
yarn lint:fix통과yarn prettier:fix통과yarn typecheck통과yarn build통과 (pre-push hook)브랜치 정보
developfix/image-upload-accept-mime-1🤖 Generated with Claude Code
Summary by CodeRabbit