I am using Retrofit 2.0 to create retrofit service for uploading file on server.
I am refering https://futurestud.io/blog/retrofit-2-how-to-upload-files-to-server
Below is my FileUploadService code:
interface TripHistoryFileUploadService {
@Multipart
@POST("trip/trip-history")
Call<ResponseBody> upload(@Part("json_file") RequestBody description,
@Part MultipartBody.Part file);
}
I am using below retrofit version:
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
But I am getting error Value missing though required like below:
Can any one face same problem or any one have solution for the same?