I have file upload input:
And I handle upload t
What worked for me was setting a key
attribute to the file input, then when I needed to reset it I update the key attribute value:
functionThatResetsTheFileInput() {
let randomString = Math.random().toString(36);
this.setState({
theInputKey: randomString
});
}
render() {
return(
)
}
That forces React to render the input again from scratch.