clear file uploader after upload
This commit is contained in:
parent
2affe457d2
commit
f0872f8173
2 changed files with 15 additions and 4 deletions
|
@ -7,7 +7,11 @@ import { connect } from 'react-redux';
|
|||
|
||||
class FileUploader extends React.Component {
|
||||
componentDidMount() {
|
||||
this.createDropzone();
|
||||
Dropzone.autoDiscover = false;
|
||||
}
|
||||
|
||||
createDropzone() {
|
||||
this.uploader = new Dropzone('div#uploader', {
|
||||
url: s3Bucket,
|
||||
method: 'post',
|
||||
|
|
|
@ -86,10 +86,17 @@ class IDEView extends React.Component {
|
|||
}
|
||||
isPlaying={this.props.ide.isPlaying}
|
||||
/>
|
||||
{(() => {
|
||||
if (this.props.ide.modalIsVisible) {
|
||||
return (
|
||||
<NewFileModal
|
||||
isVisible={this.props.ide.modalIsVisible}
|
||||
closeModal={this.props.closeNewFileModal}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return '';
|
||||
})()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue