Search code examples
ibm-cloudcloudant

How to get Images from cloudant DB and show those images through UI


Images are stored in cloudant DB in JSON Format.I need to get those images from cloudant and show it through UI. Please share the docs related to this it will be helpful.


Solution

  • information for storing and retrieving images (i.e., attachments) from Cloudant are here:

    https://console.bluemix.net/docs/services/Cloudant/api/attachments.html#attachments

    or if you are using the cloudant-nano/nodejs-cloudant library:

    https://github.com/cloudant-labs/cloudant-nano#attachments-functions

    once you retrieve the image, there are multiple ways to display it (depending on your environment):