diff options
author | Pellaeon Lin <nfsmwlin@gmail.com> | 2013-12-08 23:17:35 +0800 |
---|---|---|
committer | Pellaeon Lin <nfsmwlin@gmail.com> | 2013-12-08 23:17:35 +0800 |
commit | 64bf0fa47fe4c623672cf86e831f66974e7f650c (patch) | |
tree | abbaaaa9ddf3f1d157be0d543ec65672b03c9cc5 /apps/files/js | |
parent | fc607e6bce76e9e2f6f52421bdddece951f629cd (diff) | |
download | nextcloud-server-64bf0fa47fe4c623672cf86e831f66974e7f650c.tar.gz nextcloud-server-64bf0fa47fe4c623672cf86e831f66974e7f650c.zip |
Display different messages for uploadLimit and freeSpace
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/file-upload.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 979bb74b13f..7bd0eb81f57 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -233,11 +233,17 @@ $(document).ready(function() { // add size selection.totalBytes += file.size; - //check max upload size - if (selection.totalBytes > $('#max_upload').val()) { + // check PHP upload limit + if (selection.totalBytes > $('#upload_limit').val()) { data.textStatus = 'sizeexceedlimit'; data.errorThrown = t('files', 'File size exceeds upload limit'); } + + // check free space + if (selection.totalBytes > $('#free_space').val()) { + data.textStatus = 'notenoughspace'; + data.errorThrown = t('files', 'Not enough free space'); + } // end upload for whole selection on error if (data.errorThrown) { |