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

Image widget Image is not updating on mashup

SOLVED
Aquamarine

Image widget Image is not updating on mashup

Hi Team,

 

Have implemented one functionality in which I upload image via File Upload widget in repository and then display it immediately over image widget by creating media entity dynamically via service after clicking "Upload" button of file upload widget.

 

What actually happens it displays image correctly when I upload first time. It properly creates new media entity and displays over image widget immediately. But when I updates the image at the same time then it updates the image only at the media entity level but not refreshes on mashup.

 

Can somebody help me on this.

 

I am using code:-

 

var params = {
name: mediaEntityName /* STRING */,
content: imageContent /* IMAGE */
};

// no return
Resources["EntityServices"].UpdateMediaEntity(params);

 

My thingworx is 8.3.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Image widget Image is not updating on mashup

-Upload Image using file upload widget

-Use Service :

var Content = Things["SystemRepository"].LoadImage({
path: undefined /* STRING */ 
});

path: complete path of image

 

-Use Value Display widget :

  1. Bind output of above service to value display
  2. Click on Render and State
  3. Change the Renderer to Image in the drop down
  4. Done and Save

View solution in original post

4 REPLIES 4

Re: Image widget Image is not updating on mashup

If more than 1 person access the mashup and uploads image at the same time then  UpdateMediaEntity shows same image for all. Instead use value display widget and use Load Image service.

Re: Image widget Image is not updating on mashup

@Ashritha 

I am the only user who is accessing the mashup.

 

Actually I had bound the source url dynamically to image widget. How can I replace it with Valuedisplay. Sorry can't figure out.

Could you please elaborate a bit more.

Re: Image widget Image is not updating on mashup

-Upload Image using file upload widget

-Use Service :

var Content = Things["SystemRepository"].LoadImage({
path: undefined /* STRING */ 
});

path: complete path of image

 

-Use Value Display widget :

  1. Bind output of above service to value display
  2. Click on Render and State
  3. Change the Renderer to Image in the drop down
  4. Done and Save

View solution in original post

Re: Image widget Image is not updating on mashup

Hi @ranjank.

 

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.

 

--Sharon

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!