Bluemix Cloudant 同步 api 可以有一个字段来存储图像吗?

Can Bluemix Cloudant synch api have a field to store image?

我有一个移动应用程序使用 Mobilefirst Cloudant sdk 在 Bluemix 之上工作。 Cloudant DB 中的一种 json 文档需要将图像作为字段。你能在 Swift 中给我一些关于如何存储和读取它的例子吗? 我在设备上有一个 Cloudant 本地数据存储,它与服务器同步。所以我应该不需要担心性能?

谢谢。

假设您正在使用 CDTDatastore, you should use the attachment's API which is designed to hold binary blobs, such as images, see using attachments in the CDTDatastore documentation. You should also read up about attachments and their possible performance implications in the Cloudant Documentation