The goal is to have the SPA Upload Files page mirror the behavior of the JSF equivalent as follows:
When storage quota is present:
When the limit on the number of files in the dataset is present:
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.