summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-12-06 13:20:13 +0100
committerGitHub <noreply@github.com>2018-12-06 13:20:13 +0100
commitbc35bf14f08f6b91065377d4741762ccfba63814 (patch)
tree2f012fa967cdacdd3286030aaede2d250e15ba4f
parent5f3e27180b18d27bdd1241aac4aefee0cb2a71ab (diff)
parenta938f0ea9da68ca79de20b7041a75852c074a20e (diff)
downloadnextcloud-server-bc35bf14f08f6b91065377d4741762ccfba63814.tar.gz
nextcloud-server-bc35bf14f08f6b91065377d4741762ccfba63814.zip
Merge pull request #12866 from nextcloud/fix/12588/show_proper_not_enough_space_message
Do not show general warning on free space error
-rw-r--r--apps/files/js/file-upload.js2
-rw-r--r--apps/files/tests/js/fileUploadSpec.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 8d18761acc8..ed7cd4c2a66 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -1024,7 +1024,7 @@ OC.Uploader.prototype = _.extend({
// target folder does not exist any more
OC.Notification.show(t('files', 'Target folder "{dir}" does not exist any more', {dir: upload.getFullPath()} ), {type: 'error'});
self.cancelUploads();
- } else if (status === 507) {
+ } else if (data.textStatus === 'notenoughspace') {
// not enough space
OC.Notification.show(t('files', 'Not enough free space'), {type: 'error'});
self.cancelUploads();
diff --git a/apps/files/tests/js/fileUploadSpec.js b/apps/files/tests/js/fileUploadSpec.js
index ca88461fafb..ecf29f979d8 100644
--- a/apps/files/tests/js/fileUploadSpec.js
+++ b/apps/files/tests/js/fileUploadSpec.js
@@ -67,7 +67,8 @@ describe('OC.Upload tests', function() {
files: [file],
jqXHR: jqXHR,
response: sinon.stub().returns(jqXHR),
- submit: sinon.stub()
+ submit: sinon.stub(),
+ abort: sinon.stub()
};
if (uploader.fileUploadParam.add.call(
$dummyUploader[0],