Skip to content

fix incorrect asset size limit#4132

Open
Nixxx19 wants to merge 2 commits into
processing:developfrom
Nixxx19:fix-asset-size-limit
Open

fix incorrect asset size limit#4132
Nixxx19 wants to merge 2 commits into
processing:developfrom
Nixxx19:fix-asset-size-limit

Conversation

@Nixxx19
Copy link
Copy Markdown
Member

@Nixxx19 Nixxx19 commented May 29, 2026

Issue:

Fixes #4085

the upload size check in signS3 adds up every object under the user's S3 prefix, including files that aren't referenced by any project. those leftovers don't appear in "My Assets" and the user has no way to delete them, so people get blocked by storage they can't even see. in the issue the account shows ~68MB in My Assets but uploads are rejected against the 250MB limit.

Demo:

no UI change (server-side size calculation).
before: upload rejected even though My Assets is well under the limit.
after: the limit is checked against the same assets shown in My Assets, so the upload goes through.

Changes:

  • in listObjectsInS3ForUser (server/controllers/aws.controller.js), an asset's size is only added to totalSize when it's actually referenced by a project (moved the totalSize += inside the existing wasMatched check).
  • this makes the limit in signS3 match what's shown in My Assets.
  • added a unit test covering that orphaned objects are excluded from the total while referenced ones are counted.
  • kept it scoped to the size calculation. cleaning up the orphaned files on the delete paths is a separate, already-in-progress effort, so it's intentionally out of scope here.

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

@Nixxx19 Nixxx19 marked this pull request as draft May 29, 2026 07:56
@Nixxx19 Nixxx19 marked this pull request as ready for review May 29, 2026 09:30
@Nixxx19
Copy link
Copy Markdown
Member Author

Nixxx19 commented May 29, 2026

good morning! opened this for the asset size limit fix (#4085), would love a review whenever you get a chance @ksen0 @raclim

@yugalkaushik
Copy link
Copy Markdown
Contributor

@Nixxx19 Thank you for the PR! I’m currently assigned to work on asset and S3-related issues and there are multiple smaller issues that I’m tackling systematically. I expect all of them to be addressed by mid-June. Since this PR may overlap with the changes I’m already working on, I’d suggest checking back after that if any related issues still remain. Thanks again for your contribution and understanding.

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.

Incorrect Asset Size Limit Error

2 participants