开发者

iPhone: how to send image data to server using JSON?

开发者 https://www.devze.com 2023-01-19 21:54 出处:网络
I am newbie iphone developer, I am using JSON to send and retrieve data from server. But I used to work with text between iPhone and server. Now I would like to send image data from iPhone to server a

I am newbie iphone developer, I am using JSON to send and retrieve data from server. But I used to work with text between iPhone and server. Now I would like to send image data from iPhone to server and vice versa, retrieve image data fr开发者_运维问答om server database to iphone. Can anyone show me how I can accomplish this?

Thanks


Encode your image with base64, then send the base64 string as json. On the serverside decode the base64 again and save it or do whatever you want with it

0

精彩评论

暂无评论...
验证码 换一张
取 消