I have a picture upload button that automatically uploads the file when selected from the browse window.
Nonetheless, it doesn\'t work the second time around and that is
If you're using React or just javascript in general you can what you can also do is "reset" the value of the event target.
So If you have something like a component that can upload and "remove" an image:
your onChange can be:
onChange(event) {
const files = event.target.files;
// your logic here on what to do with files (maybe fetch the preview or something)
// this line right below will reset the
// input field so if you removed it you can re-add the same file
event.target.value = ''
}