diff options
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 154b970c5be..d26cecd02ee 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -69,10 +69,9 @@ OCA.Sharing.PublicApp = { var filesClient = new OC.Files.Client({ host: OC.getHost(), port: OC.getPort(), - userName: token, // note: password not be required, the endpoint // will recognize previous validation from the session - root: OC.getRootPath() + '/public.php/webdav', + root: OC.getRootPath() + '/public.php/dav/files/' + token + '/', useHTTPS: OC.getProtocol() === 'https' }); @@ -167,11 +166,10 @@ OCA.Sharing.PublicApp = { return; } // Undocumented Url to public WebDAV endpoint - var url = parent.location.protocol + '//' + location.host + OC.linkTo('', 'public.php/webdav'); + var url = parent.location.protocol + '//' + location.host + OC.linkTo('', 'public.php/dav/files/'+ token); $.ajax({ url: url, headers: { - Authorization: 'Basic ' + btoa(token + ':'), Range: 'bytes=0-10000' } }).then(function (data) { @@ -247,7 +245,9 @@ OCA.Sharing.PublicApp = { // also add auth in URL due to POST workaround base = OC.getProtocol() + '://' + token + '@' + OC.getHost() + (OC.getPort() ? ':' + OC.getPort() : ''); } - return base + OC.getRootPath() + '/public.php/webdav' + encodedPath; + + // encodedPath starts with a leading slash + return base + OC.getRootPath() + '/public.php/dav/files/' + token + encodedPath; }; this.fileList.getAjaxUrl = function (action, params) { |