Skip to content

block files larger than 25mb on comments #10894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

3kh0
Copy link
Member

@3kh0 3kh0 commented Jul 10, 2025

Summary of the problem

comments on transactions allow you to upload almost any file, and any size, which is really bad for that aws bill

Describe your changes

this adds a simple limit to comment creations, checking the file size to not be larger than 25mb (which should be very generous for most peeps)

@3kh0 3kh0 requested review from a team as code owners July 10, 2025 02:00
@Luke-Oldenburg
Copy link
Contributor

This is what I get after uploading too large of a file.
Screenshot From 2025-07-12 15-58-58

Copy link
Member

@garyhtou garyhtou left a comment

Choose a reason for hiding this comment

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

Please use active_storage_validations to validate this!

https://github.com/igorkasyanchuk/active_storage_validations

Also, 25mb feels a bit small — we should determine what the 95 percentile is in prod

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.

3 participants