I want to allow users to update their photo so they can see the existing picture on the page, then they upload the new one and ‘click’, the new image replaces the old one.
I’ve coded this on a button, to be clicked after the new image is uploaded:
export function buttonImage_click ( event ) {
$w ( “#uploadButton” ). startUpload ()
. then ( ( uploadedFile ) => {
$w ( “#image1” ). src = uploadedFile . url ;
})
}
But the image shown in #image1 doesn’t change. The new picture does show when #image1 is not connected to the database field, but of course, then the existing image isn’t shown.
Thanks for any help with this.