diff --git a/frontend/src/components/share-link-panel/link-details.js b/frontend/src/components/share-link-panel/link-details.js index a416e73c23..22ad548f42 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 bdcb7bdc46..2e49777c40 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: