iPhone:如何使用 JSON 将图像数据发送到服务器?
我是 iPhone 开发新手,我正在使用 JSON 从服务器发送和检索数据。但我曾经在 iPhone 和服务器之间处理文本。现在我想将图像数据从 iPhone 发送到服务器,反之亦然,从服务器数据库检索图像数据到 iPhone。谁能告诉我如何才能做到这一点?
谢谢
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 from server database to iphone. Can anyone show me how I can accomplish this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Base64 对图像进行编码,然后将 Base64 字符串作为 json 发送。在服务器端再次解码 Base64 并保存它或用它做任何你想做的事情
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