aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/files_drop.js
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-10-28 15:05:07 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2024-01-09 10:56:14 +0100
commit82b5a19a35b780bf18ebac46711166158a5a6cb2 (patch)
treebbc44ee4e65f4b7c2f480962f15a9aeb0ca9587f /apps/files_sharing/js/files_drop.js
parent7b6a650b6e09b07d4b85a4ae84eb64a6c32b217f (diff)
downloadnextcloud-server-82b5a19a35b780bf18ebac46711166158a5a6cb2.tar.gz
nextcloud-server-82b5a19a35b780bf18ebac46711166158a5a6cb2.zip
fix: public dav and files_sharing testing fixes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/js/files_drop.js')
-rw-r--r--apps/files_sharing/js/files_drop.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js
index ffbe8284433..5215cfc5b54 100644
--- a/apps/files_sharing/js/files_drop.js
+++ b/apps/files_sharing/js/files_drop.js
@@ -24,10 +24,9 @@
var filesClient = new OC.Files.Client({
host: OC.getHost(),
port: OC.getPort(),
- userName: $('#sharingToken').val(),
// 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/' + $('#sharingToken').val() + '/',
useHTTPS: OC.getProtocol() === 'https'
});
@@ -45,7 +44,7 @@
return false;
}
var base = OC.getProtocol() + '://' + OC.getHost();
- data.url = base + OC.getRootPath() + '/public.php/webdav/' + encodeURI(name);
+ data.url = base + OC.getRootPath() + '/public.php/dav/files/' + $('#sharingToken').val() + '/' + encodeURI(name);
data.multipart = false;
@@ -53,14 +52,6 @@
data.headers = {};
}
- var userName = filesClient.getUserName();
- var password = filesClient.getPassword();
- if (userName) {
- // copy username/password from DAV client
- data.headers['Authorization'] =
- 'Basic ' + btoa(userName + ':' + (password || ''));
- }
-
$('#drop-upload-done-indicator').addClass('hidden');
$('#drop-upload-progress-indicator').removeClass('hidden');