okhttp上传具有概率失真的图像

时间:2019-01-07 06:49:55

标签: android okhttp

当我通过okhttp上传文件时,请使用以下方式

版本:com.squareup.okhttp3:okhttp:3.12.0

-webkit-print-color-adjust:exact;

然后我在onResponse()方法中得到响应

后台服务器不对图像进行任何处理,仅返回链接。

有时我得到的图片很完整,有时会变形。

喜欢这些:

enter image description here

我的使用方法是否错误?

我还使MediaType MediaType.parse(“ image / *”)或MediaType.parse(“ image / png”)或MediaType.parse(“ image / jpeg”)也无效。

1 个答案:

答案 0 :(得分:0)

我找到了解决方案,只需将okhttpclient对象写为单例。

相关问题