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

[Feature] 사장님 가게 등록 api 연결 #299

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

hsgo2430
Copy link
Contributor

개요

가게 등록 api 연결


작업 상세내용

  • 가게 이미지 등록시 preSignedUrl을 통해 S3로 이미지 업로드후 fileUrl을 통해 해당 이미지에 접근하도록 구현

  • 가게 상세 정보 등록 페이지
    사용자가 등록할 가게의 정보를 최종 확인한 후 다음 버튼을 누르면 API를 이용하여 등록하도록 구현
    -

@hsgo2430 hsgo2430 requested a review from a team as a code owner June 26, 2024 06:21
Copy link
Contributor

@Jokwanhee Jokwanhee left a comment

Choose a reason for hiding this comment

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

고생했습니다!

S3에 이미지를 업로드할 때는 클라이언트에서 이미지 리사이징을 해주는 것이 좋습니다. S3도 Storage 이기 때문에 용량이 있어 이미지가 많이 업로드되면 용량 초과될 수 있어 요금이 발생해요!
사장님이 이미지를 등록할 때, 핸드폰으로 많이 촬영하실텐데 기본 화질이 높기때문에 1~2MB 가 넘어갑니다. 이렇게 큰 이미지는 클라에서 불러올 때도 한 세월 걸립니다. ㅠㅠ

한 번 비트맵 리사이징에 대해서 공부해보면 좋을 것 같아요 ^^!! 👍

Copy link
Contributor

@yunjaena yunjaena left a comment

Choose a reason for hiding this comment

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

수고했습니다! comment확인해주세요!


}

private fun uploadImage(
Copy link
Contributor

Choose a reason for hiding this comment

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

compress 작업을 viewModel에서 하지 않고 repository에서 작업하는거는 어떨까요?

Copy link
Contributor Author

@hsgo2430 hsgo2430 Jun 27, 2024

Choose a reason for hiding this comment

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

저도 repository에서 compress 작업을 해보고 싶었는데 domain에서는 Bitmap이 android.graphics 경로에 있다보니 선언을 할수가 없더라구요 그래서 repository에서 할 수 없었습니다...

Copy link
Contributor

Choose a reason for hiding this comment

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

byteArrayOutputStream으로 넘겨주면 되지 않나요?

Copy link
Contributor

Choose a reason for hiding this comment

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

그리고 분리된 로직이 안보이는데 확인 부탁합니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

참고링크 한번 이 아티클을 참고해봐도 좋을 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

uri를 String형식으로 넘겨서 repository에서 UploadImageLocalDataSource를 사용해서 압축하도록 변경하였습니다!

압축로직은 core/upload/ImageUtil이라는 파일로 분리하여 나영님 작업물에도 적용해 놓았습니다!

Copy link
Contributor

@yunjaena yunjaena left a comment

Choose a reason for hiding this comment

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

추가 커멘트 달았습니다 확인해주세요 :)


}

private fun uploadImage(
Copy link
Contributor

Choose a reason for hiding this comment

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

byteArrayOutputStream으로 넘겨주면 되지 않나요?


}

private fun uploadImage(
Copy link
Contributor

Choose a reason for hiding this comment

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

그리고 분리된 로직이 안보이는데 확인 부탁합니다!

Copy link
Contributor

@yunjaena yunjaena left a comment

Choose a reason for hiding this comment

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

LGTM 수고하셨습니다!

Copy link
Contributor

@Jokwanhee Jokwanhee left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 👍

@hsgo2430 hsgo2430 self-assigned this Jul 1, 2024
@hsgo2430 hsgo2430 merged commit f82f431 into develop Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants