mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 18:03:48 +00:00
@@ -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});
|
||||
|
@@ -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,
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
});
|
||||
|
@@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user