Perspective Image Refresh

I have a perspective view that has an image component thats source property is bound to a webdev service.

The webdev service is getting the bytes of an image from the database and serving it up to the view (image component). That all works fine without issue.

I have a file upload component that is updating the bytes in the database and I am trying to trigger the image source to refresh. The trouble is that it doesn’t seem to be picking up the changes to from the database. I’m not sure if it is not seeing a change to the web URL for the webservice or what the problem is.

I have tried blanking the source property and then calling refreshbinding, but the old image still appears. If I close the view and re-open it. The new image is displayed.

Can you try passing a variable in the url that changes? Maybe a timestamp in millis.

1 Like

I added a Custom Property named “Refresh” and just incremented it by one when a file was uploaded.

Then I added another parameter to the binding for the source to include “&Refresh=” +{view.custom.Refresh}. this way whenever refresh changes, the source is updated.

Works like a treat!!! Thanks jpark.