Currently I'm showing an image with the following code:
<img ng-src="{{user.profileImage}}") class='img-circle photo' />
The user is able to change that photo using an upload function. The profileImage will be overwritten because filename is renamed to the users _id. So for example the path is: https://some-bucket.s3.amazonaws.com/profiles/5cfa5fb5850b2755d89574cc.png.
After a successful upload the path stays the same, but the content on the url will become different, the image will still show the old image, even after reloading the whole $scope.user.
I tried to use an different path for the image like data.profileImage and clearing user.profileImage before loading, adding ng-if="user.profileImage !='' to the image, but it isn't working.
Is there a way to reload the image without reloading the whole page?
I didn't paste the upload code, I think it's not necessary for this issue.
?<timestamp>to user.profileImage