Skip to content

Feature Request: Show storage/file quotas on the Upload Files page; disable Files to Add button when limits reached #897

@landreev

Description

@landreev

The goal is to have the SPA Upload Files page mirror the behavior of the JSF equivalent as follows:
When storage quota is present:

Image

When the limit on the number of files in the dataset is present:

Image

The upload button ('Select Files to Add' in the screenshots) gets disabled when either limit is maxed out.

This pr in the main repo - IQSS/dataverse#11997 - finalizes the convenience API that can be used to obtain the information about any remaining quota allocations for the dataset, when either one, or both of the limits are present (this will be in 6.9):

/api/datasets/{id}/uploadlimits 
{
  "status": "OK",
  "data": {
     "uploadLimits": {
       "numberOfFilesRemaining": 20,
       "storageQuotaRemaining": 1048576
    } 
  }
}

When neither limit is present, the output will be like this:

{
  "status": "OK",
  "data": {
     "uploadLimits": {} 
  }
}

The API requires authentication and the Edit permission on the dataset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions