1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

update api name (#4470)

* update api name

* update api name
This commit is contained in:
杨顺强
2020-03-06 14:19:48 +08:00
committed by GitHub
parent b39b71fdfc
commit 91a8bf9c24
5 changed files with 10 additions and 10 deletions

View File

@@ -39,7 +39,7 @@ class GenerateUploadLink extends React.Component {
getUploadLink = () => {
let path = this.props.itemPath;
let repoID = this.props.repoID;
seafileAPI.getUploadLinks(repoID, path).then((res) => {
seafileAPI.getUploadLink(repoID, path).then((res) => {
if (res.data.length !== 0) {
let sharedUploadInfo = new UploadLink(res.data[0]);
this.setState({sharedUploadInfo: sharedUploadInfo});

View File

@@ -200,7 +200,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 => {
@@ -213,7 +213,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 => {
@@ -553,7 +553,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 => {
@@ -579,7 +579,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;
@@ -650,7 +650,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,

View File

@@ -79,7 +79,7 @@ class EditorUtilities {
uploadImage = (imageFile) => {
return (
seafileAPI.getUploadLink(repoID, dirPath).then((res) => {
seafileAPI.getFileServerUploadLink(repoID, dirPath).then((res) => {
let uploadLinkComponent = res.data;
const uploadLink = uploadLinkComponent + '?ret-json=1';
const name = getImageFileNameWithTimestamp();
@@ -102,7 +102,7 @@ class EditorUtilities {
uploadLocalImage = (imageFile) => {
return (
seafileAPI.getUploadLink(repoID, dirPath).then((res) => {
seafileAPI.getFileServerUploadLink(repoID, dirPath).then((res) => {
const uploadLink = res.data + '?ret-json=1';
const newFile = new File([imageFile], imageFile.name, {type: imageFile.type});
const formData = new FormData();

View File

@@ -367,7 +367,7 @@ class ShareAdminShareLinks extends Component {
}
componentDidMount() {
seafileAPI.listShareLinks().then((res) => {
seafileAPI.listUserShareLinks().then((res) => {
let items = res.data.map(item => {
return new ShareLink(item);
});

View File

@@ -199,7 +199,7 @@ class ShareAdminUploadLinks extends Component {
}
componentDidMount() {
seafileAPI.listUploadLinks().then((res) => {
seafileAPI.listUserUploadLinks().then((res) => {
let items = res.data.map(item => {
return new UploadLink(item);
});