I am trying to update my profile information. I am using retrofit2
. When I didn't add photo in our object then I am able to update data on server using retrofit
. for example
@POST("users/{id}/")
Call<ServiceResponse> calledEditProfile(@Header("Authorization") String token,
@Path("id") String id,
@Part JsonObject jsonObject);
I am using this type object for updating the data.
{
"user": {
"fullname": "Ashutosh",
"username": "ashu",
"email": "ashu@gmail.com",
"photo: ""
}
}
and it is working fine but when I tried to upload image using multipart
then it is not supporting.
I have Googled many thing but didn't get satisfactory answer.
I have tried @part
but didn't get success.
Please suggest me how can I move forward from here.
Thanks in advance