@Multipart
@POST("user/update/basicinfo")
Call<CommonApiData> setUserBasicInfo(@PartMap Map<String, RequestBody> temp_map,@Part MultipartBody.Part file);
RequestBody fileBody = null;
MultipartBody.Part body = null;
if(!mstuvApplication.loginObject.get("profile_img").getAsString().equals(profile_img)) {
try {
File file = new File(convertContentToFileUri(Uri.parse(profile_img)).toString());
fileBody = RequestBody.create(MediaType.parse("image/*"), file);
body = MultipartBody.Part.createFormData("profile_img", file.getName(), fileBody);
} catch (Exception e) {
e.printStackTrace();
}
}
[ProfileFragment$2.onFailure():161]file:/storage/emulated/0/Download/1982298427_428b531b_B5ACEBAFB829.jpg (No such file or directory)
이런식으로 하여 파일을 던지는데 MultipartBody가 아닌 RequestBody에 넣어서 다른 정보와 같이 맵에 넣어서 던져도 보고 일반적으로 던져도 봤는데 서버통신을 하면 그러니 통신을 하다가 에러가 나고있습니다 onFailue 에서요파일낫파운드 에러가 납니다 ㅠㅠ 도대체 이유가 뭘까요
어떤게 잘못된건가요?? 서버통신은 간단하게 enqueue를 통해서 하고있습니다.