Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[온보딩] step02 썸네일 등록 시 아이폰 이미지 확장자(heic) 업로드 안되는 현상 수정 #497

Merged
merged 7 commits into from
Mar 14, 2024

Conversation

ExceptAnyone
Copy link
Member

이슈 넘버

구현 사항

  • step02 썸네일 등록 시 아이폰 이미지 확장자(heic) 업로드 안되는 현상 수정
  • handleImageUpload 함수에서 너무 많은 역할을 한다 판단하여 함수를 분리하였습니다.

Need Review

  • ~ 부분 이렇게 구현했어요, 피드백 부탁해요!

지민님이 먼저 예외처리 발견해주셔서 해당 코드 참고하여 작성하였습니다!
감사합니다 ㅎㅎ

함수 분리 부분 언제든 리뷰 환영입니다 :)

📸 스크린샷

Reference

이미지 업로드가 되는 것을 진행해놓은 상태에서
다시 고용량 이미지를 추가하면 이미지 업로드가 되는 현상이 있어
이를 수정하였습니다.
Copy link

github-actions bot commented Mar 13, 2024

PR Preview Action v1.4.6
🚀 Deployed preview to https://SWEET-DEVELOPERS.github.io/sweet-client/pr-preview/pr-497/
on branch gh-pages at 2024-03-14 06:09 UTC

@ExceptAnyone ExceptAnyone added feat💡 기능 구현 refactor ⚙️ 개선 사항 온보딩 📝 방 만들기 페이지 labels Mar 13, 2024
@@ -57,7 +57,7 @@ const ThumbnailInput = React.memo((props: ThumbnailInputProps) => {
<S.IcEmptyThumbnailWrapper>
<input
type='file'
accept='image/jpeg, image/png, image/gif, image/heic '
accept='image/jpeg, image/png, image/gif, image/heic, image/webp, image/HEIC'
Copy link
Contributor

Choose a reason for hiding this comment

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

앗 이거 저도 수정해야 하는데, MIME type은 대소문자 구분을 하지 않고 주로 소문자로 쓰인다고 해서 image/heic만 유지해도 될 것 같아요!

MIME 타입


const usePreviewImage = () => {
const { previewImageInfo, updatePreviewImageInfo } = usePreviewImageContext();

const handleImageUpload = (event: React.ChangeEvent<HTMLInputElement>) => {
const { files } = event.target;
const uploadFalse = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

이 부분을 함수 분리하셨군요! 가독성이 더 좋아졌네요👍

@ExceptAnyone ExceptAnyone merged commit c8ec4f8 into develop Mar 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat💡 기능 구현 refactor ⚙️ 개선 사항 온보딩 📝 방 만들기 페이지
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants