iPhone:如何使用 JSON 将图像数据发送到服务器?

发布于 2024-09-27 11:34:16 字数 147 浏览 6 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坏尐絯 2024-10-04 11:34:17

使用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文