-->

How to store an image from context broker?

2020-04-16 05:25发布

问题:

I want to send images from various android to context broker, I am not sure how I would go about decoding the image from string format and then storing it to the file system and database respectively. Would I have to develop my own python script or could Cygnus help me out here?

回答1:

Although there are several approaches to transcode a binary file (such an image) into text (e.g. Base64) it doesn't use to be a good idea in Orion Context Broker. Big static files are better placed in an Object Storage service, such the one that FIWARE provides.

Each file in such systems is identified by an URL. You can use that URL for the attribute values in Orion Context Broker that refer to the given image.