1
我想上傳一個圖像使用改進2到PHP服務器,但我不知道我怎麼能達到這/ PHP中的這些參數。如何在PHP中使用retrofit 2來讀取@Multipart參數?
@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);
更多細節:http://stackoverflow.com/questions/36491096/retrofit-multipart-request-required-multipartfile-parameter-file-is-not-pre/36514662 – zerstoer