0
votes

I have one input file, with onChange handler, it will handle when user upload a file, but if user try to upload the exactly same file again. onChange handler will not fire.

<input type='file' onChange={this.handleChange}/>
1

1 Answers

0
votes

This issue is caused because onChange won't trigger when you have the input file which has not changed from the previous upload and therefore onChange isn't triggered.

You can fix this easily by resetting the input field's value after you read the file.