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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to convert Thingworx Image Datatype to String

Partha
4-Participant

How to convert Thingworx Image Datatype to String

How to convert Thingworx Image Datatype to String in thingworx Services

3 REPLIES 3
odukiya
15-Moonstone
(To:Partha)

Hello @Partha 

 

Please refer following community post ,if it is what you are trying to achieve

https://community.ptc.com/t5/ThingWorx-Developers/Convert-image-to-base64/td-p/557667

 

In case you have further concern, please feel free to revert and share the your use case .

 

Thanks

Om Dukiya

suverma
12-Amethyst
(To:Partha)

Hi @Partha 

 

Can you also give a try to below code to convert Image DataType to String:

 

var img = me.ImageProp; //When you have defined a property of Type Image

 

or

 

var img = MediaEntities["img"].GetImage(); //simply get the image name of pre-defined MediaEntity
var result = base64EncodeString(img); //Define Output type as String

 

slangley
23-Emerald II
(To:Partha)

Hi @Partha.

 

If your feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags