Skip to main content
1-Visitor
January 10, 2019
Question

Retrieve image from database and display it on mashup

  • January 10, 2019
  • 1 reply
  • 2493 views

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 

1 reply

1-Visitor
January 11, 2019

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

1-Visitor
January 23, 2019

How to Update the Property with baseb4 encoded image content?

Please explain in detail.

 

Regards,

Khushboo jain

1-Visitor
January 23, 2019

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