summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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],