diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 13:50:53 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 13:53:55 +0100 |
commit | 0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425 (patch) | |
tree | f8b01bae69374f5deef25140ab6ec9642baac602 /apps | |
parent | 07f78c824833bfcb3233f881286dc625d81e44f6 (diff) | |
download | nextcloud-server-0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425.tar.gz nextcloud-server-0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425.zip |
Fixed upload issue when free space is not known
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/file-upload.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index b9c4dc941f7..b7b8f6fdeb6 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -206,6 +206,7 @@ OC.Upload = { add: function(e, data) { OC.Upload.log('add', e, data); var that = $(this); + var freeSpace; // we need to collect all data upload objects before starting the upload so we can check their existence // and set individual conflict actions. unfortunately there is only one variable that we can use to identify @@ -261,7 +262,8 @@ OC.Upload = { } // check free space - if (selection.totalBytes > $('#free_space').val()) { + freeSpace = $('#free_space').val(); + if (freeSpace >= 0 && selection.totalBytes > freeSpace) { data.textStatus = 'notenoughspace'; data.errorThrown = t('files', 'Not enough free space, you are uploading {size1} but only {size2} is left', { 'size1': humanFileSize(selection.totalBytes), |