|
|
|
@ -36,6 +36,13 @@ export default class UploadPage extends React.Component {
|
|
|
|
UploadActions.uploadFile(file)
|
|
|
|
UploadActions.uploadFile(file)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleSelectedFile(event) {
|
|
|
|
|
|
|
|
let files = event.target.files;
|
|
|
|
|
|
|
|
if (files.length > 0) {
|
|
|
|
|
|
|
|
UploadActions.uploadFile(files[0]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
switch (this.state.status) {
|
|
|
|
switch (this.state.status) {
|
|
|
|
case 'ready':
|
|
|
|
case 'ready':
|
|
|
|
@ -50,7 +57,7 @@ export default class UploadPage extends React.Component {
|
|
|
|
<p>Drag the file into this window to get started.</p>
|
|
|
|
<p>Drag the file into this window to get started.</p>
|
|
|
|
<p>Or
|
|
|
|
<p>Or
|
|
|
|
<label className="myLabel">
|
|
|
|
<label className="myLabel">
|
|
|
|
<input type="file" required/>
|
|
|
|
<input type="file" onChange={this.handleSelectedFile} required/>
|
|
|
|
<span>select a file</span>
|
|
|
|
<span>select a file</span>
|
|
|
|
</label>
|
|
|
|
</label>
|
|
|
|
.
|
|
|
|
.
|
|
|
|
|