question

vogonor avatar image
vogonor asked ·

How to link clover categories/items to images to be displayed in clover app?

I am working on retrieving clover categories/items and linking them with images stored in MongoDB. Can you please advise on how to accomplish this. The front end is Angular 7 and a backend running on Nodejs. The linked category/item is to be displayed in the clover app. The image is to be stored in MongoDB in a base64 format.

clover developer community
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·

Pretty broad question.... but...

  1. Keep your own mapping of the item ID to an image.
  2. Expose an endpoint to get an image given an item ID.
  3. Use that endpoint in your app to pull down the image (unclear what you mean by "Clover app", on device or web? Anyway, doesn't change things)

Storing an image in base64 format... not sure why you'd do that. You will incur significant processing time to convert back and forth.

Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community