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 {
|
class FileUploader extends React.Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
this.createDropzone();
|
||||||
Dropzone.autoDiscover = false;
|
Dropzone.autoDiscover = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
createDropzone() {
|
||||||
this.uploader = new Dropzone('div#uploader', {
|
this.uploader = new Dropzone('div#uploader', {
|
||||||
url: s3Bucket,
|
url: s3Bucket,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
|
@ -86,10 +86,17 @@ class IDEView extends React.Component {
|
||||||
}
|
}
|
||||||
isPlaying={this.props.ide.isPlaying}
|
isPlaying={this.props.ide.isPlaying}
|
||||||
/>
|
/>
|
||||||
|
{(() => {
|
||||||
|
if (this.props.ide.modalIsVisible) {
|
||||||
|
return (
|
||||||
<NewFileModal
|
<NewFileModal
|
||||||
isVisible={this.props.ide.modalIsVisible}
|
isVisible={this.props.ide.modalIsVisible}
|
||||||
closeModal={this.props.closeNewFileModal}
|
closeModal={this.props.closeNewFileModal}
|
||||||
/>
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue