Merge pull request #12880 from nextcloud/backport/12866/stable15

[stable15] Do not show general warning on free space error
This commit is contained in:
Morris Jobke 2018-12-06 14:28:05 +01:00 committed by GitHub
commit 6dfc3d9a98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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();

View file

@ -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],