Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
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.
Solved! Go to Solution.
-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 :
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.
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.
-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 :
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