KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
245 stars 86 forks source link

File reload not working #59

Closed Oxxy-k closed 2 years ago

Oxxy-k commented 2 years ago

Hello, thank you for your job! I have a problem in Google Chrome when I try to reload the same file another time. If I upload a file, then change the state to null, and try to upload the same file again, the onChange or onSelect event doesn't fire. Prop value fileOrFiles={state} doesn't work

Mohamed-Elhawary commented 2 years ago

@Oxxy-k I have the same issue here, did you get a proper solution ??

KarimMokhtar commented 2 years ago

Hello @Oxxy-k , @Mohamed-Elhawary Thank you so much for your contributions: please be notified that this issue was solved on v.2.3.7 and above. Thanks.

Mykybo commented 2 years ago

I am on 2.3.7 and it's still not working. handleChange is called only the first time, on second upload of same file it is not called.

Mykybo commented 2 years ago

i had to fix it by using a workaround with fileOrFiles

davialmeida commented 2 years ago

@Mykybo what was the solution used?