Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
Which service in ThingWorx 9.2 is used to convert image into base64 code.
Please share the snippet of reading the image from repository and converting it into base64 code.
Thanks in advance.
Solved! Go to Solution.
"Convert image to base64": https://community.ptc.com/t5/ThingWorx-Developers/Convert-image-to-base64/td-p/557667
And also other useful topics:
Hi @RK_0705,
Maybe you can try using LoadBinary function of FileRepository things to load Blob content of the image in your repository.
let Content = Things["RepositoryName"].LoadBinary({
path: "/pathToImage/image.jpg" /* STRING */
});
Hi @RK_0705,
If you 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,
Tony
LoadBinary service is returning the Base64 code but in BLOB type.
Could you please help me how to parse from BLOB to STRING in ThingWorx 9.2 as I have to pass base64 code to one rest api which is expecting STRING as input and not as type BLOB.
Thanks in advance.
You're welcome.