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

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -