diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/l10n/cs.js | 1 | ||||
-rw-r--r-- | apps/files_sharing/l10n/cs.json | 1 | ||||
-rw-r--r-- | apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php | 5 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareControllerTest.php | 16 |
4 files changed, 15 insertions, 8 deletions
diff --git a/apps/files_sharing/l10n/cs.js b/apps/files_sharing/l10n/cs.js index 342b9e4f588..ddd9f9e9319 100644 --- a/apps/files_sharing/l10n/cs.js +++ b/apps/files_sharing/l10n/cs.js @@ -313,6 +313,7 @@ OC.L10N.register( "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Tuto metodu použijte pro nasdílení souborů jednotlivcům nebo týmům ve vaší organizaci. Pokud příjemce už má přístup ke sdílení, ale nemůže ho nalézt, můžete mu přístup usnadnit zasláním vnitřního odkazu na sdílení.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Tuto metodu používejte pro sdílení souborů s jednotlivci nebo organizacemi vně té vaší. Soubory a složky je možné nasdílet prostřednictvím veřejných odkazů na sdílení a e-mailových adres. Je také možné nasdílet ostatním Nextcloud účtům hostovaným na různých instancích a to prostřednictvím jejich identifikátorů v rámci federovaného cloudu.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.", + "Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu", "Share with accounts and teams" : "Nasdílet účtům a týmům", "Email, federated cloud ID" : "E-mail, identif. federovaného cloudu", "Unable to load the shares list" : "Nedaří se načíst seznam sdílení", diff --git a/apps/files_sharing/l10n/cs.json b/apps/files_sharing/l10n/cs.json index 8e6393fd417..b135d8e9e9e 100644 --- a/apps/files_sharing/l10n/cs.json +++ b/apps/files_sharing/l10n/cs.json @@ -311,6 +311,7 @@ "Use this method to share files with individuals or teams within your organization. If the recipient already has access to the share but cannot locate it, you can send them the internal share link for easy access." : "Tuto metodu použijte pro nasdílení souborů jednotlivcům nebo týmům ve vaší organizaci. Pokud příjemce už má přístup ke sdílení, ale nemůže ho nalézt, můžete mu přístup usnadnit zasláním vnitřního odkazu na sdílení.", "Use this method to share files with individuals or organizations outside your organization. Files and folders can be shared via public share links and email addresses. You can also share to other Nextcloud accounts hosted on different instances using their federated cloud ID." : "Tuto metodu používejte pro sdílení souborů s jednotlivci nebo organizacemi vně té vaší. Soubory a složky je možné nasdílet prostřednictvím veřejných odkazů na sdílení a e-mailových adres. Je také možné nasdílet ostatním Nextcloud účtům hostovaným na různých instancích a to prostřednictvím jejich identifikátorů v rámci federovaného cloudu.", "Shares that are not part of the internal or external shares. This can be shares from apps or other sources." : "Sdílení, která nejsou součástí interních nebo externích sdílení. Toto mohou být sdílení z aplikací nebo jiných zdrojů.", + "Share with accounts, teams, federated cloud IDs" : "Nasdílejte účtům, týmům, identifikátorům v rámci federovaného cloudu", "Share with accounts and teams" : "Nasdílet účtům a týmům", "Email, federated cloud ID" : "E-mail, identif. federovaného cloudu", "Unable to load the shares list" : "Nedaří se načíst seznam sdílení", 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()); diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 58cbb4e0b82..524336787cb 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -261,8 +261,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); @@ -552,8 +556,12 @@ class ShareControllerTest extends \Test\TestCase { ['files_sharing.sharecontroller.showShare', ['token' => 'token'], 'shareUrl'], // this share is not an image to the default preview is used ['files_sharing.PublicPreview.getPreview', ['x' => 256, 'y' => 256, 'file' => $share->getTarget(), 'token' => 'token'], 'previewUrl'], - // for the direct link - ['files_sharing.sharecontroller.downloadShare', ['token' => 'token', 'filename' => $filename ], 'downloadUrl'], + ]); + + $this->urlGenerator->expects($this->once()) + ->method('getAbsoluteURL') + ->willReturnMap([ + ['/public.php/dav/files/token/?accept=zip', 'downloadUrl'], ]); $this->previewManager->method('isMimeSupported')->with('text/plain')->willReturn(true); |