mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
[shared dir view] added 'download selected items' (#4535)
This commit is contained in:
@@ -31,9 +31,14 @@ class ZipDownloadDialog extends React.Component {
|
||||
|
||||
componentDidMount() {
|
||||
const { token, path, repoID, target } = this.props;
|
||||
const getZipTask = token ?
|
||||
seafileAPI.getShareLinkZipTask(token, path) :
|
||||
seafileAPI.zipDownload(repoID, path, target);
|
||||
let getZipTask;
|
||||
if (token) {
|
||||
getZipTask = target.length ?
|
||||
seafileAPI.getShareLinkDirentsZipTask(token, path, target) :
|
||||
seafileAPI.getShareLinkZipTask(token, path);
|
||||
} else {
|
||||
getZipTask = seafileAPI.zipDownload(repoID, path, target);
|
||||
}
|
||||
getZipTask.then((res) => {
|
||||
const zipToken = res.data['zip_token'];
|
||||
this.setState({
|
||||
|
Reference in New Issue
Block a user