파일 업로드 (1) 썸네일형 리스트형 [Android] OPEN_DOCUMENT로 가져온 Uri를 Multipart.Part로 만들기(Retrofit2 파일 업로드) SDK 29부터 적용딘 Scoped Stroage에 대응하여 제작 1. Retrofit2를 사용한 파일 업로드 Retrofit에서 파일 업로드를 구현하는 경우 Multipart를 사용합니다. 기존 인터넷에 있는 소스의 경우 File Picker에서 가져온 Uri를 가지고 파일의 경로를 직접 알아내어 구현하는 방식을 사용합니다. ... File file = FileUtils.getFile(this, fileUri); // create RequestBody instance from file RequestBody requestFile = RequestBody.create( MediaType.parse(getContentResolver().getType(fileUri)), file ); // MultipartB.. 이전 1 다음