cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve image from database and display it on mashup

Level 7

Retrieve image from database and display it on mashup

hi Everyone 

I am  trying to  stored image directly in SQL database  and then retrieve that image from table and display it on mashup. so after storing image on DB by taking image as base type of that Column and while fetching it from db by writing service it is giving me that encrypted text so my question is how i can convert it to actual images and what should be that return type of that service ? images.PNG

 

Thanks in advance 

4 REPLIES 4

Re: Retrieve image from database and display it on mashup

Hi

You can create Property in Thing  BaseType As an Image, and Update the Property with baseb4 encoded imge content  and by Using Value Display Widget  you can able view the image in Mashup Runtime

Re: Retrieve image from database and display it on mashup

How to Update the Property with baseb4 encoded image content?

Please explain in detail.

 

Regards,

Khushboo jain

Re: Retrieve image from database and display it on mashup

You can Update through custom services, or Rest API from External program, 

If You  need to create Custom services 

var Encodvalue ="****Image base 64 encodedValue*****";

Things["***ThingName****].**Propertyname***=Encodvalue;

Or 

By Using REST API you can update  Thing Property Value....Thingworx API STRUCTURE document avalible in PTC Support Website, Please Refer That Document..

Re: Retrieve image from database and display it on mashup

Hi @RockLala.

 

If one of the previous responses helped to answer your questions, please mark the appropriate one as the Accepted Solution for the benefit of others with the same questions.

 

Regards.

 

--Sharon