iOS使用formData形式上传图片,java服务端无法转变成图片
阿神
阿神 2017-04-18 09:07:00
0
2
303

1.iOS端将图片转换成data类型,然后通过afn上传服务器代码,但是服务器端通过字节流解析出来的十六进制和我本地的data并不一样.不知道为啥.

2.下面是java端的代码,

哪位大神看看,是哪里的问题??

阿神
阿神

闭关修行中......

reply all(2)
黄舟

When uploading on iOS, use UIImagePNGRepresentation to convert to data type, and the server can receive it and save it directly as an image

小葫芦

Try to set the content type field in the header part.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!