Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi All,
I am trying to post/send an image which is stored as a property in TW to an external web server using Rest API. I have used POSTImage snippet to try this out. But I am getting the below error
Wrapped java.lang.Exception: Unable To Convert From [B to JSON Cause: Unable To Convert From [B to JSON
I am not very sure if PostImage snippet is actually meant to meet the above requirement.
Is there any other way?
Thanks and Regards,
Vishal Vaidya
I'm pretty new to whole ThingWorx and havent' tried posting images but have you thought about base64 encoding the image as a string, submitting that, and converting back to image on ThingWorx side?
This was just an idea on top of my head. Not that ThingWorx specific solution.
Thanks Miikka,
Even i thought the same but not sure how to encode image as string in Thingworx. Though there are snippet available but i have not come across any proper example where image is encoded in string or vice versa using base64EncodeBytes or similar services.
Regards,
Vishal Vaidya