From 6ffe042d01ebd76ef3dfbed55772e5983d21d0c3 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 (cherry picked from commit ee793572cb9acc9d688b1ff191a59e8699af9da1) --- apps/files/js/files.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 603ff9b704f..ec306232193 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