How to read @Multipart parameters using retrofit 2 in PHP? -
i'm trying upload image using retrofit 2 php server, don't know how can reach this/these parameters in php.
@multipart @post("upload/testimage") call<resultobj> getimageone(@part("file\";file=\"image.png\"") requestbody file); @multipart @post("upload/testimage") call<resultobj> uploadimage(@partmap map<string, requestbody> params);
i solved changing retrofit version: compile 'com.squareup.retrofit2:retrofit:2.0.1' , using multipart in way:
@multipart @post("/example/updinfo") call updateinfo(@part multipartbody.part pic, @partmap map params);
Comments
Post a Comment