Merge pull request #12866 from nextcloud/fix/12588/show_proper_not_enough_space_message

Do not show general warning on free space error
This commit is contained in:
Morris Jobke 2018-12-06 13:20:13 +01:00 committed by GitHub
commit bc35bf14f0
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],