Skip to content

[PB-6327] feat(file-size-limit): limit file size on create and replace#1047

Merged
apsantiso merged 1 commit into
masterfrom
feat/add-file-size-limit
Apr 28, 2026
Merged

[PB-6327] feat(file-size-limit): limit file size on create and replace#1047
apsantiso merged 1 commit into
masterfrom
feat/add-file-size-limit

Conversation

@apsantiso
Copy link
Copy Markdown
Collaborator

@apsantiso apsantiso commented Apr 28, 2026

This prepares the environment for file size limit.

Changes

  • Created migration for file size limits
  • Added file size limit check for not empty files

@apsantiso apsantiso changed the title feat(file-size-limit): limit file size on POST and Replace feat(file-size-limit): limit file size on create and replace Apr 28, 2026
@apsantiso apsantiso force-pushed the feat/add-file-size-limit branch from db57f75 to 971e1ac Compare April 28, 2026 07:45
* chore: increase limit folder stats

* reduce limit to 1000
@sonarqubecloud
Copy link
Copy Markdown

@apsantiso apsantiso self-assigned this Apr 28, 2026
@apsantiso apsantiso requested a review from sg-gs April 28, 2026 08:08
@apsantiso apsantiso marked this pull request as ready for review April 28, 2026 08:08
@apsantiso apsantiso requested a review from jzunigax2 as a code owner April 28, 2026 08:08
@apsantiso apsantiso changed the title feat(file-size-limit): limit file size on create and replace [PB-6327] feat(file-size-limit): limit file size on create and replace Apr 28, 2026
Copy link
Copy Markdown
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

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

We should expire the cache if a tier change occurs. Is there any point in these changes where that is handled?

This needs to be done if we are going to rely on the cache when possible, otherwise weird situations like not being able to do something after upgrading or allowing something temporarily after downgrading could happen.

@apsantiso
Copy link
Copy Markdown
Collaborator Author

apsantiso commented Apr 28, 2026

@sg-gs The cache is for the tier (globally), not the user. If we increase limit for a plan someday, we can just wait 10 minutes for the TTL to expire.

I am thinking about adding a cache for the user's tier, overriden limits or whatever setting that we can just remove/upgrade when the user has changed the plan like we do with the limit, but that would be a nice-to-have that I preferred not to handle in this ticket.

Copy link
Copy Markdown
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

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

Running migration @apsantiso

@sg-gs
Copy link
Copy Markdown
Member

sg-gs commented Apr 28, 2026

Migration run @apsantiso

$ cross-env NODE_ENV=production sequelize db:migrate

Sequelize CLI [Node: 22.16.0, CLI: 6.6.3, ORM: 6.37.7]

Loaded configuration file "src/config/sequelize.js".
Using environment "production".
== 20260428065637-add-max-upload-file-size-limit: migrating =======
== 20260428065637-add-max-upload-file-size-limit: migrated (0.077s)

Done in 1.01s.

@apsantiso apsantiso merged commit ff55f5c into master Apr 28, 2026
9 checks passed
@apsantiso apsantiso deleted the feat/add-file-size-limit branch April 28, 2026 14:22
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.

2 participants