Skip to content

Commit

Permalink
DIG-27084 Moved clearing of input to enable multiple upload
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksalhus committed Sep 8, 2017
1 parent d1ad572 commit 3cb1b86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/file-upload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ class FileUpload extends React.Component {
}

triggerUploadFileNativeHandler() {
// clear file input to trigger onChange when uploading same filename
if (this.fileInputElement) {
this.fileInputElement.value = '';
}
this.fileInputElement.click();
}

onFilesSelected(event) {
this.props.onFilesSelected(event.target.files);

// clear file input to trigger onChange when uploading same filename
if (this.fileInputElement) {
this.fileInputElement.value = '';
}
}

onFileDeleted(event) {
Expand Down

0 comments on commit 3cb1b86

Please sign in to comment.