mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
@@ -624,14 +624,22 @@ class FileUploader extends React.Component {
|
|||||||
|
|
||||||
uploadFile = () => {
|
uploadFile = () => {
|
||||||
let resumableFile = this.resumable.files[this.resumable.files.length - 1];
|
let resumableFile = this.resumable.files[this.resumable.files.length - 1];
|
||||||
this.setState({
|
let { repoID, path } = this.props;
|
||||||
isUploadRemindDialogShow: false,
|
seafileAPI.getUploadLink(repoID, path).then((res) => { // get upload link
|
||||||
isUploadProgressDialogShow: true,
|
this.resumable.opts.target = res.data + '?ret-json=1';
|
||||||
uploadFileList: [...this.state.uploadFileList, resumableFile]
|
this.setState({
|
||||||
}, () => {
|
isUploadRemindDialogShow: false,
|
||||||
this.resumable.upload();
|
isUploadProgressDialogShow: true,
|
||||||
|
uploadFileList: [...this.state.uploadFileList, resumableFile]
|
||||||
|
}, () => {
|
||||||
|
this.resumable.upload();
|
||||||
|
});
|
||||||
|
Utils.registerGlobalVariable('uploader', 'isUploadProgressDialogShow', true);
|
||||||
|
|
||||||
|
}).catch(error => {
|
||||||
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
|
toaster.danger(errMessage);
|
||||||
});
|
});
|
||||||
Utils.registerGlobalVariable('uploader', 'isUploadProgressDialogShow', true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelFileUpload = () => {
|
cancelFileUpload = () => {
|
||||||
|
Reference in New Issue
Block a user