]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix 404 when using index.php in the url
authorCarl Schwan <carl@carlschwan.eu>
Tue, 5 Jul 2022 11:16:32 +0000 (13:16 +0200)
committerCarl Schwan <carl@carlschwan.eu>
Tue, 5 Jul 2022 14:39:39 +0000 (16:39 +0200)
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit ee793572cb9acc9d688b1ff191a59e8699af9da1)

apps/files/js/files.js

index 6aa871d99c0f6f890d2958671112ff0a1e56e4bb..e02a69cd13a71eed93f762ba9f0776b6dcae1ec5 100644 (file)
@@ -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);
                        });
                },