From ee793572cb9acc9d688b1ff191a59e8699af9da1 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 5 Jul 2022 13:16:32 +0200 Subject: Fix 404 when using index.php in the url Signed-off-by: Carl Schwan --- apps/files/js/files.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 6aa871d99c0..e02a69cd13a 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -25,7 +25,9 @@ state.call.abort(); } state.dir = currentDir; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats') + '?dir=' + encodeURIComponent(currentDir),function(response) { + state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats', { + dir: currentDir, + }), function(response) { state.dir = null; state.call = null; Files.updateMaxUploadFilesize(response); @@ -37,7 +39,7 @@ }, _updateStorageQuotas: function() { var state = Files.updateStorageQuotas; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats'),function(response) { + state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats'), function(response) { Files.updateQuota(response); }); }, -- cgit v1.2.3 From ca6a7245032e87f6d7f65c8e796cc0f176659677 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 5 Jul 2022 13:43:58 +0200 Subject: add missing GET param to getstoragestats url Signed-off-by: Julien Veyssier --- apps/files/js/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index e02a69cd13a..8645719f82b 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -25,7 +25,7 @@ state.call.abort(); } state.dir = currentDir; - state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats', { + state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats?dir={dir}', { dir: currentDir, }), function(response) { state.dir = null; -- cgit v1.2.3