Function trigger after change in streamlit upload

Hi everyone, I want to know is it possible to trigger a function when the streamlit uploader state has change.

In my case, I use the streamlit uploader to display an image and annotate them and if the user changes the image, the annotate point will automatically clear out. I have tried using on_change on the st_uploader but it trigger even though I have not yet change my image.

Any possible lead on this?, thanks.

After some time, I found another workaround using file location as basis for if condition and compare if there is change in the file by checking the name. Also founded out that the on_change for st_uploader is buggy

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.