mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 03:47:09 +00:00
Merge pull request #4877 from haiwen/share-link-upload-done
add share link file upload done api
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import Logo from '../../components/logo';
|
||||
import Account from '../../components/common/account';
|
||||
@@ -22,6 +23,11 @@ const {
|
||||
|
||||
class SharedUploadLink extends React.Component {
|
||||
|
||||
onFileUploadSuccess = (direntObject) => {
|
||||
const { name, size } = direntObject;
|
||||
seafileAPI.shareLinksUploadDone(token, Utils.joinPath(path, name));
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="h-100 d-flex flex-column">
|
||||
@@ -55,7 +61,7 @@ class SharedUploadLink extends React.Component {
|
||||
token={token}
|
||||
repoID={repoID}
|
||||
path={path}
|
||||
onFileUploadSuccess={() => {}}
|
||||
onFileUploadSuccess={this.onFileUploadSuccess}
|
||||
/>
|
||||
</Fragment>
|
||||
)}
|
||||
|
@@ -262,6 +262,7 @@ class SharedDirView extends React.Component {
|
||||
let items = Array.from(this.state.items);
|
||||
items.splice(folderItems.length, 0, newItem);
|
||||
this.setState({items: items});
|
||||
seafileAPI.shareLinksUploadDone(token, Utils.joinPath(dirPath, name));
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user