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

이미지 용량 최적화 #283

Merged
merged 8 commits into from
Jan 3, 2024
Merged

Conversation

dudwns
Copy link
Contributor

@dudwns dudwns commented Dec 29, 2023

📑 이슈 번호

#282

🚧 구현 내용

  • browser-image-compression 라이브러리를 사용해서 용량이 큰 이미지일 경우 사이즈를 압축해서 전송하는 것으로 변경하였습니다. (413 에러 해결)
const resizingBlob = await imageCompression(e?.target.files[0], {
        maxSizeMB: 0.5, // 이미지가 0.5MB 보다 크면 압축을 진행
      })
      setImageFile(resizingBlob)
스크린샷 2023-12-29 오전 12 41 13

🚨 특이 사항

영운님께서 검색 로직에 MySQL Full Text Search를 도입한다고 하셔서 검색 요구 사항이 조금 변경되었습니다.

1. 검색 키워드가 한 글자일 경우 검색되지 않도록 변경하였습니다. (전체 검색, 프로필 내부 검색)

토스트 알림으로 예외 처리 추가

스크린샷 2023-12-29 오후 6 21 27

2. 전체 검색 키워드의 required 삭제 (프로필 내부 검색이랑 동일)

아무것도 입력하지 않았을 때 전체 스페이스 or 전체 유저가 나오도록 required를 삭제하였습니다.

스크린샷 2023-12-29 오후 6 25 37

@dudwns dudwns added the ✨ Feature 기능 개발 label Dec 29, 2023
@dudwns dudwns self-assigned this Dec 29, 2023
@dudwns dudwns linked an issue Dec 29, 2023 that may be closed by this pull request
1 task
Copy link
Member

@eeseung eeseung left a comment

Choose a reason for hiding this comment

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

연말에도 달리셨군요.. LGGGGGTM 입니다! 👍

@@ -43,6 +44,11 @@ const useSearchModal = ({
}

const onSubmit: SubmitHandler<SearchFormValues> = (data) => {
if (data.search.length === 1) {
notify('info', '검색어는 최대 2글자여야 합니다.')
Copy link
Member

Choose a reason for hiding this comment

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

최소 2글자로 수정해야 할 것 같습니다! 💡

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정했습니다! 😄

@dudwns dudwns merged commit 8bef20f into develop Jan 3, 2024
1 check passed
@dudwns dudwns deleted the feature/#282/image-compression branch January 3, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

이미지 용량 최적화
2 participants