From f79fafcf0625afdf16aad14b5584b8bad95ae1c8 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 10 Feb 2016 19:09:52 +0100 Subject: Revert back to non-webdav download link for public URLs Fixes issues with browsers not happy with the token. Fixes activities which were not sent. --- apps/files_sharing/tests/js/publicAppSpec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/files_sharing/tests/js/publicAppSpec.js') diff --git a/apps/files_sharing/tests/js/publicAppSpec.js b/apps/files_sharing/tests/js/publicAppSpec.js index 8561836d77c..58565744882 100644 --- a/apps/files_sharing/tests/js/publicAppSpec.js +++ b/apps/files_sharing/tests/js/publicAppSpec.js @@ -102,12 +102,12 @@ describe('OCA.Sharing.PublicApp tests', function() { it('returns correct download URL for single files', function() { expect(fileList.getDownloadUrl('some file.txt')) - .toEqual('https://sh4tok@example.com:9876/owncloud/public.php/webdav/subdir/some file.txt'); - expect(fileList.getDownloadUrl('some file.txt', '/another path/abc')) - .toEqual('https://sh4tok@example.com:9876/owncloud/public.php/webdav/another path/abc/some file.txt'); + .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fsubdir&files=some%20file.txt'); + expect(fileList.getDownloadUrl('some file.txt', '/anotherpath/abc')) + .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2Fanotherpath%2Fabc&files=some%20file.txt'); fileList.changeDirectory('/'); expect(fileList.getDownloadUrl('some file.txt')) - .toEqual('https://sh4tok@example.com:9876/owncloud/public.php/webdav/some file.txt'); + .toEqual(OC.webroot + '/index.php/s/sh4tok/download?path=%2F&files=some%20file.txt'); }); it('returns correct download URL for multiple files', function() { expect(fileList.getDownloadUrl(['a b c.txt', 'd e f.txt'])) -- cgit v1.2.3