LukasMarx / react-file-upload

MIT License
145 stars 118 forks source link

Uploading Same File More Than Once Issue #3

Open ramikhafagi96 opened 4 years ago

ramikhafagi96 commented 4 years ago

in Dropzone component you need to clear the input value in order to be able to upload same file more than once, as when you upload the same file again it will have the same key of the later one and it will not render

dineshrsharma commented 4 years ago

Issue still open :(

In DropZone.js:

openFileDialog() { if (this.props.disabled) return; this.fileInputRef.current.value = null; //Uploading same file again this.fileInputRef.current.click(); }

NandaScott commented 4 years ago

Not sure if this is still needed, but if you add onClick={() => (e.target.value = null)} to your input tag, it'll let you upload the same file if you remove it from the list.