Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. 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.