From df7ca18ca9d9e62e8ac1dbcf4517f7cf76dca188 Mon Sep 17 00:00:00 2001 From: pjft Date: Tue, 10 Aug 2021 08:11:23 +0100 Subject: [PATCH] Update apps/files/js/file-upload.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: John Molakvoæ Signed-off-by: pjft --- apps/files/js/file-upload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 800e78f9b887e..ee6dcb9247b3c 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -997,7 +997,8 @@ OC.Uploader.prototype = _.extend({ freeSpace = $('#free_space').val() } else if (upload.getTargetFolder().indexOf(self.fileList.getCurrentDirectory()) === 0) { // Check subdirectory free space if file is uploaded there - var targetSubdir = upload._targetFolder.split("/")[upload._targetFolder.split("/").length-1] + // Retrieve the folder destination name + var targetSubdir = upload._targetFolder.split('/').pop() freeSpace = parseInt(upload.uploader.fileList.getModelForFile(targetSubdir).get('quotaAvailableBytes')) } if (freeSpace >= 0 && selection.totalBytes > freeSpace) {