diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-12-06 14:28:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 14:28:05 +0100 |
commit | 6dfc3d9a98b06e1b97def75287c66ec9c7eaef02 (patch) | |
tree | ad5b75f31abe037fb6e53f8171ea71431a7dbc6e | |
parent | 1f94126f59f7cdb1e45448e4380db8ff74858633 (diff) | |
parent | 6d77389fbf2f82cca2daba1c30ff9e4fd05fdc57 (diff) | |
download | nextcloud-server-6dfc3d9a98b06e1b97def75287c66ec9c7eaef02.tar.gz nextcloud-server-6dfc3d9a98b06e1b97def75287c66ec9c7eaef02.zip |
Merge pull request #12880 from nextcloud/backport/12866/stable15
[stable15] Do not show general warning on free space error
-rw-r--r-- | apps/files/js/file-upload.js | 2 | ||||
-rw-r--r-- | apps/files/tests/js/fileUploadSpec.js | 3 |
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], |