Skip to content

Storage Quota/Upload Limit Integration#921

Merged
jp-tosca merged 10 commits intodevelopfrom
StorageQuota
Mar 25, 2026
Merged

Storage Quota/Upload Limit Integration#921
jp-tosca merged 10 commits intodevelopfrom
StorageQuota

Conversation

@ChengShi-1
Copy link
Copy Markdown
Contributor

@ChengShi-1 ChengShi-1 commented Feb 9, 2026

What this PR does / why we need it:

Show storage/file quotas on the Upload Files page

Which issue(s) this PR closes:

Special notes for your reviewer:

  • I expect the upload limits will have more fields, but for now, it shows Storage Quota only

  • When the file exceeds the storage quota, it would raise an error. It has been implemented before.

  • The test coverage is not passing, but I solve it in other PR(Manage template)

Suggestions on how to test this:

  • You may need to enable the setting and set upload limit through API first, to let the storage quotas set.
  • Use the /settings API to enable or disable the enforcement of storage quotas that are defined across the instance via the following setting:
    curl -X PUT -d 'true' http://localhost:8080/api/admin/settings/:UseStorageQuotas
  • To set or change the storage allocation quota for a collection:
    curl -X PUT -H "X-Dataverse-key:$API_TOKEN" -d $SIZE_IN_BYTES $SERVER_URL/api/dataverses/$ID/storage/quota
  • Create a dataset, upload a file, then check the text above the upload box, "Select files or drag and drop into the upload widget. Maximum of 1,000 files per upload." should be shown and "Storage Quota: xx(the number you set minus the current file size) remaining" should also be shown if you set the number through PUT api above.
image

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Yes, a screenshot above

Is there a release notes or changelog update needed for this change?:

Yes, changelog should be updated

Additional documentation:

@ChengShi-1 ChengShi-1 added the Size: 3 A percentage of a sprint. 2.1 hours. label Feb 9, 2026
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Feb 9, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review February 9, 2026 17:54
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 9, 2026

Coverage Status

coverage: 97.77% (+0.4%) from 97.395%
when pulling 6381f92 on StorageQuota
into e0ddce8 on develop.

@ChengShi-1 ChengShi-1 added the FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) label Feb 9, 2026
@ekraffmiller ekraffmiller self-assigned this Feb 10, 2026
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Feb 10, 2026
@cmbz cmbz added the FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) label Feb 11, 2026
Copy link
Copy Markdown
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good & works really nicely! just a couple of comments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the DatasetRepository, rather than directly calling the jsDataverse function

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have a FileUploadInput story that shows the file upload limit messages.

Copy link
Copy Markdown
Contributor

@ekraffmiller ekraffmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the updates, approved 👍

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Feb 12, 2026
@ekraffmiller ekraffmiller removed their assignment Feb 12, 2026
@ChengShi-1 ChengShi-1 added the SPA.Q1.2026.3 Show storage file quota label Feb 17, 2026
@cmbz cmbz added the FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) label Feb 26, 2026
@cmbz cmbz added this to the 6.11 milestone Mar 11, 2026
@jp-tosca jp-tosca self-assigned this Mar 23, 2026
@jp-tosca jp-tosca moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Mar 23, 2026
@jp-tosca
Copy link
Copy Markdown
Contributor

@ChengShi-1 @ekraffmiller

I am looking into this. It seems that it is not very clear why this upload is failing:

image

Is there a way to put a warning or somehow emphasize the text "Storage quota: 128 B remaining" and also provide a more informative message on why this failed? The text "There was an error uploading this file." doesn't provide enough feedback to people to understand why it failed, and the user relies on having to read the text above.

Let me know what you think and if this would be an easy change.

@ChengShi-1
Copy link
Copy Markdown
Contributor Author

ChengShi-1 commented Mar 23, 2026

@jp-tosca Thanks for the QA and your feedback. I agree your suggestion makes sense here.
However, the error message was implemented prior to this PR, so it isn’t covered in this change and I only addressed the text above. Also, since we may want to include this ASAP for the rollout. Can I just create a separate issue to handle this as a future optimization?

@ekraffmiller
Copy link
Copy Markdown
Contributor

@jp-tosca I think it's a good idea to show the error message from the API, but it's not a simple one line fix, since it has to go through some layers in the UI, so I think given our time frame is best to do that as a separate follow up issue.

@jp-tosca
Copy link
Copy Markdown
Contributor

The last item we discussed regarding to this PR and will be added as an improvement is the missing button "done".

@jp-tosca jp-tosca merged commit 361f2c8 into develop Mar 25, 2026
13 of 18 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Mar 25, 2026
@jp-tosca jp-tosca removed their assignment Mar 25, 2026
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) FY26 Sprint 18 FY26 Sprint 18 (2026-02-25 - 2026-03-11) GREI Re-arch GREI re-architecture-related Project: HDV SPA Rollout Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1.2026.3 Show storage file quota SPA

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

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

6 participants