使用改造Android将文件上传到服务器?

时间:2019-04-12 12:23:25

标签: android retrofit

我正在尝试将图像上传到我的服务器。图片网址是PUT的{​​{1}}请求 下面是我的改造电话接口方法

“Content-Type” : “application/octet-stream”

我称之为

 @Headers("Content-Type:application/octet-stream")
@PUT
Call<UserIdentity> putUserProfileImage(@Url String url,
                                       @Body RequestBody file);

文件包含图像。 有帮助吗?

0 个答案:

没有答案