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

View file

@ -86,10 +86,17 @@ class IDEView extends React.Component {
} }
isPlaying={this.props.ide.isPlaying} isPlaying={this.props.ide.isPlaying}
/> />
<NewFileModal {(() => {
isVisible={this.props.ide.modalIsVisible} if (this.props.ide.modalIsVisible) {
closeModal={this.props.closeNewFileModal} return (
/> <NewFileModal
isVisible={this.props.ide.modalIsVisible}
closeModal={this.props.closeNewFileModal}
/>
);
}
return '';
})()}
</div> </div>
); );
} }