diff options
author | Louis Chemineau <louis@chmn.me> | 2025-05-21 16:01:54 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2025-05-21 16:01:54 +0200 |
commit | ec1db0c32adc0342dda4fcf3b78e8517c965ae37 (patch) | |
tree | aeaa8104f986e7264c3736de406f13e87035b953 /apps/files_sharing/lib | |
parent | 009d0c550ca4d23d8670528c4117293da34c51b9 (diff) | |
download | nextcloud-server-ec1db0c32adc0342dda4fcf3b78e8517c965ae37.tar.gz nextcloud-server-ec1db0c32adc0342dda4fcf3b78e8517c965ae37.zip |
fix: Replace the deprecated direct download link with the public DAV endpointartonge/feat/do_not_require_samesite_strict_cookie_on_public.php
Follow-up of #48098
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php index 686ba32fd49..910d00a5972 100644 --- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php +++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php @@ -149,10 +149,7 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider $headerActions = []; if ($view !== 'public-file-drop' && !$share->getHideDownload()) { // The download URL is used for the "download" header action as well as in some cases for the direct link - $downloadUrl = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.downloadShare', [ - 'token' => $token, - 'filename' => ($shareNode instanceof File) ? $shareNode->getName() : null, - ]); + $downloadUrl = $this->urlGenerator->getAbsoluteURL('/public.php/dav/files/' . $token . '/?accept=zip'); // If not a file drop, then add the download header action $headerActions[] = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $downloadUrl, 0, (string)$shareNode->getSize()); |