1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 22:54:11 +00:00

update seafile-js api (#4405)

This commit is contained in:
杨顺强
2020-01-11 13:29:04 +08:00
committed by Daniel Pan
parent 450b23d0d9
commit c3dff6225f
7 changed files with 13 additions and 13 deletions

View File

@@ -195,7 +195,7 @@ class FileUploader extends React.Component {
} else {
this.setUploadFileList(this.resumable.files);
let { repoID, path } = this.props;
seafileAPI.getUploadLink(repoID, path).then(res => {
seafileAPI.getFileServerUploadLink(repoID, path).then(res => {
this.resumable.opts.target = res.data + '?ret-json=1';
this.resumableUpload(resumableFile);
}).catch(error => {
@@ -208,7 +208,7 @@ class FileUploader extends React.Component {
if (!this.isUploadLinkLoaded) {
this.isUploadLinkLoaded = true;
let { repoID, path } = this.props;
seafileAPI.getUploadLink(repoID, path).then(res => {
seafileAPI.getFileServerUploadLink(repoID, path).then(res => {
this.resumable.opts.target = res.data + '?ret-json=1';
this.resumable.upload();
}).catch(error => {
@@ -548,7 +548,7 @@ class FileUploader extends React.Component {
onUploadRetry = (resumableFile) => {
seafileAPI.getUploadLink(this.props.repoID, this.props.path).then(res => {
seafileAPI.getFileServerUploadLink(this.props.repoID, this.props.path).then(res => {
this.resumable.opts.target = res.data + '?ret-json=1';
let retryFileList = this.state.retryFileList.filter(item => {
@@ -574,7 +574,7 @@ class FileUploader extends React.Component {
onUploadRetryAll = () => {
seafileAPI.getUploadLink(this.props.repoID, this.props.path).then(res => {
seafileAPI.getFileServerUploadLink(this.props.repoID, this.props.path).then(res => {
this.resumable.opts.target = res.data + '?ret-json=1';
this.state.retryFileList.forEach(item => {
item.error = false;
@@ -645,7 +645,7 @@ class FileUploader extends React.Component {
uploadFile = () => {
let resumableFile = this.resumable.files[this.resumable.files.length - 1];
let { repoID, path } = this.props;
seafileAPI.getUploadLink(repoID, path).then((res) => { // get upload link
seafileAPI.getFileServerUploadLink(repoID, path).then((res) => { // get upload link
this.resumable.opts.target = res.data + '?ret-json=1';
this.setState({
isUploadRemindDialogShow: false,