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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Issue displaying Dynamic Image

Anonxlm
3-Visitor

Issue displaying Dynamic Image

Hey guys,

I've reviewed some posts in the forums that are relevant to my issue - Such as "How to set image in media entity dynamically?" that was posted by done11.  I am currently facing an issue with my dynamic media entity.
I have followed this code snippet:

var params = {

 

  url:  'https://pbs.twimg.com/profile_images/447374371917922304/P4BzupWu.jpeg' /* STRING */,

 

};

 

// result: IMAGE

var image = Resources["ContentLoaderFunctions"].LoadImage(params);

 

var params = {

  name: 'TestMedia'/* STRING */,

  content: image

};

 

// no return

Resources["EntityServices"].UpdateMediaEntity(params);

 

I have set up a template thing that is referencing a file repository base thing template, then I proceeded to create a thing with the service(baseType ImageLink) mentioned above. I created a "dynamic" media entity that has a corresponding name to my service. I bound the service from my thing to the media entity but I have no image displaying currently upon runtime.

 

I have also tried changing the baseType to Image and linking the data to a value display, but this method did not work either.

 

 

Here are the errors that I receive:

Error from the server: "Wrapped java.net.SocketException: Software caused connection abort: recv failed Cause: Software caused connection abort: recv failed"

Any help would be appreciated.
Thanks.

 

0 REPLIES 0
Top Tags