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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Issues displaying Dynamic Image

Anonxlm
3-Visitor

Issues 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.

1 REPLY 1
wposner-2
12-Amethyst
(To:Anonxlm)

Is there a specific reason you're trying to use a media entity when you can just use an image widget and bind the output of your service (with a few modifications) to the image widget?

Top Tags