Multipart upload image along with other text fileds #5
Comments
What error you get? You should use E.g. fun updateProfile(@Header("Authorization") headerAuth: String,
@Body @Multipart(name = "image", mimeType = "image/*") file: Uri,
@Part("name")name: RequestBody,
@Part("email")email: RequestBody): Observable |
thanx will check it and inform back to you |
this is i got.. java.lang.IllegalArgumentException: @part parameters can only be used with multipart encoding. (parameter #3) code i have used. Api.create().updateProfile("UserToken",
|
how can i upload a image file along with other text strings
@post("/user/profile/update")
fun updateProfile(@Header("Authorization") headerAuth: String,
@Body @multipart(name = "image", mimeType = "image/*") file: Uri,
@part("name")name: String,
@part("email")email: String): Observable
this code gives error
The text was updated successfully, but these errors were encountered: