Fix 404 when using index.php in the url

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit ee793572cb)
This commit is contained in:
Carl Schwan 2022-07-05 13:16:32 +02:00 committed by backportbot-nextcloud[bot]
parent bed164801e
commit 51151487b4

View 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);
});
},