Skip to content

Enforce asset cap and surface upload-limit messaging#4056

Open
yugalkaushik wants to merge 2 commits intoprocessing:developfrom
yugalkaushik:memory-fix
Open

Enforce asset cap and surface upload-limit messaging#4056
yugalkaushik wants to merge 2 commits intoprocessing:developfrom
yugalkaushik:memory-fix

Conversation

@yugalkaushik
Copy link
Copy Markdown
Contributor

Issue:

Fixes #4009

Demo:

image

Changes:

Ensure backend signing rejects uploads once current size plus incoming file exceeds the 250MB limit, using fresh S3 totals to avoid stale user size.

  • aws.controller.js: When signing uploads, we now use the latest S3 total plus the incoming file size and stop at the 250MB cap to prevent new assets from slipping through.
  • users.js: Align client-side gating with the 250MB ceiling using inclusive checks so the UI mirrors server enforcement.
  • uploader.js If the server returns 403 for a sign request, we trigger the upload-limit modal instead of failing silently.
  • ErrorModal.jsx: Added an uploadLimit branch that reuses the existing size-limit copy and points users to assets to clear space.
  • FileUploader.jsx: Hooks the uploader into the updated accept flow so limit errors still route through the standard modal experience.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Upload limit exceeded but still allowing uploads

1 participant