From f28d933acc2d97021c69be79c7f2238cbaac419f Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Wed, 17 Jul 2024 16:48:47 +0200 Subject: feat(files_sharing): add public name prompt for files requests Signed-off-by: skjnldsv --- apps/files_sharing/js/files_drop.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing/js/files_drop.js') diff --git a/apps/files_sharing/js/files_drop.js b/apps/files_sharing/js/files_drop.js index fd9b796ee2c..450af078af2 100644 --- a/apps/files_sharing/js/files_drop.js +++ b/apps/files_sharing/js/files_drop.js @@ -22,7 +22,7 @@ // note: password not be required, the endpoint // will recognize previous validation from the session root: OC.getRootPath() + '/public.php/dav/files/' + $('#sharingToken').val() + '/', - useHTTPS: OC.getProtocol() === 'https' + useHTTPS: OC.getProtocol() === 'https', }); // We only process one file at a time 🤷‍♀️ @@ -47,6 +47,10 @@ data.headers = {}; } + if (localStorage.getItem('nick') !== null) { + data.headers['X-NC-Nickname'] = localStorage.getItem('nick') + } + $('#drop-upload-done-indicator').addClass('hidden'); $('#drop-upload-progress-indicator').removeClass('hidden'); -- cgit v1.2.3