Skip to content

Add to make File by Real Path through Uri#108

Open
aahspringaa4 wants to merge 3 commits into
ParkSangGwon:masterfrom
aahspringaa4:feature/recieve_imagefile
Open

Add to make File by Real Path through Uri#108
aahspringaa4 wants to merge 3 commits into
ParkSangGwon:masterfrom
aahspringaa4:feature/recieve_imagefile

Conversation

@aahspringaa4

@aahspringaa4 aahspringaa4 commented May 20, 2022

Copy link
Copy Markdown

TedImagePicker에서 반환되는 사진의 Uri를 통해서 Real Path를 가져옵니다. 그 다음 Real Path를 사용해서 파일을 만드는 코드이다.
서버와의 통신을 예로 들면 서버에 사진값을 보낼때 대부분 파일 형태로 주는 경우가 많다. 하지만 숙련도가 부족한 이들은 이에 어려움을 느낄 것이다.
이 pr은 그들을 위해 사진을 파일 형태로 수령 할 수 있는 코드를 구현한 것이다.

  1. Uri를 통해 Real Path를 가져오고 Real Path로 파일을 만드는 Util 파일 구현
  2. MainActivity에서 예시 코드 구현

@ParkSangGwon ParkSangGwon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

정확히 어느경우에 Real path를 가지는 File이 필요한지 잘 모르겠습니다.
Uri만으로 충분하고 remote에 이미지를 보낼때 Stream이나 ByteArray만으로 전달하면 충분한것 같습니다.

그리고 만약에 필요하다고 하더라고
Uri로부터 Real path를 갖는 File을 만드는 작업은 ImagePicker 라이브러리의 역할이 아닌것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants