Skip to content

"An unknown error has occurred" when not enough quota #12588

@nickvergessen

Description

@nickvergessen

Happens on master:

  1. Set the quota of a user to 0 or a few bytes
  2. Upload a file as that user
  3. Expected ❓
    } else if (status === 507) {
    // not enough space
    OC.Notification.show(t('files', 'Not enough free space'), {type: 'error'});
    self.cancelUploads();
    or
    freeSpace = $('#free_space').val();
    if (freeSpace >= 0 && selection.totalBytes > freeSpace) {
    data.textStatus = 'notenoughspace';
    data.errorThrown = t('files',
    'Not enough free space, you are uploading {size1} but only {size2} is left', {
    'size1': humanFileSize(selection.totalBytes),
    'size2': humanFileSize($('#free_space').val())
    });
    }
  4. Actually throws 💥
    // HTTP connection problem or other error
    var message = t('files', 'An unknown error has occurred');
    if (upload) {
    var response = upload.getResponse();
    if (response) {
    message = response.message;
    }
    }
    OC.Notification.show(message || data.errorThrown, {type: 'error'});

Works fine in stable14

@skjnldsv can you have a look? You modified the upload stuff in general lately?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions