clear file uploader after upload

This commit is contained in:
catarak 2016-07-20 18:37:49 -04:00
parent 2affe457d2
commit f0872f8173
2 changed files with 15 additions and 4 deletions

View file

@ -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',

View file

@ -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>
);
}