From d5cf8bd445e3121af5630c1172c1001aabb7b058 Mon Sep 17 00:00:00 2001 From: r350178982 <32759763+r350178982@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:35:31 +0800 Subject: [PATCH] update --- frontend/src/components/share-link-panel/link-details.js | 4 ++-- seahub/api2/endpoints/internal_api.py | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/share-link-panel/link-details.js b/frontend/src/components/share-link-panel/link-details.js index a416e73c234..22ad548f420 100644 --- a/frontend/src/components/share-link-panel/link-details.js +++ b/frontend/src/components/share-link-panel/link-details.js @@ -53,7 +53,7 @@ class LinkDetails extends React.Component { onCopyDownloadLink = () => { const { sharedLinkInfo } = this.props; - copy(`${sharedLinkInfo.download_link}`); + copy(`${sharedLinkInfo.download_link}?op=view`); toaster.success(gettext('Direct download link is copied to the clipboard.')); }; @@ -182,7 +182,7 @@ class LinkDetails extends React.Component {
{gettext('Direct download link')}
diff --git a/seahub/api2/endpoints/internal_api.py b/seahub/api2/endpoints/internal_api.py index bdcb7bdc467..2e49777c402 100644 --- a/seahub/api2/endpoints/internal_api.py +++ b/seahub/api2/endpoints/internal_api.py @@ -95,11 +95,6 @@ def post(self, request): error_msg = 'Permission denied.' return api_error(status.HTTP_403_FORBIDDEN, error_msg) - can_download = share_obj.get_permissions()['can_download'] - if not can_download: - error_msg = 'Permission denied.' - return api_error(status.HTTP_403_FORBIDDEN, error_msg) - repo_id = share_obj.repo_id repo = seafile_api.get_repo(repo_id) if not repo: