Skip to content

Commit

Permalink
Update apps/files/js/file-upload.js
Browse files Browse the repository at this point in the history
Co-authored-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
  • Loading branch information
pjft and skjnldsv authored Aug 10, 2021
1 parent e7f26d9 commit cc4612f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/files/js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cc4612f

Please sign in to comment.