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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Retrieve image from database and display it on mashup

RockLala
11-Garnet

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
sarathi
12-Amethyst
(To:RockLala)

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

khushboo_jain
6-Contributor
(To:sarathi)

How to Update the Property with baseb4 encoded image content?

Please explain in detail.

 

Regards,

Khushboo jain

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..

slangley
23-Emerald II
(To:sarathi)

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

Top Tags