fix incorrect asset size limit#4132
Open
Nixxx19 wants to merge 2 commits into
Open
Conversation
Member
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Fixes #4085
the upload size check in
signS3adds 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:
listObjectsInS3ForUser(server/controllers/aws.controller.js), an asset's size is only added tototalSizewhen it's actually referenced by a project (moved thetotalSize +=inside the existingwasMatchedcheck).signS3match what's shown in My Assets.I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123