Skip to content
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

Max fileupload #411

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Max fileupload #411

merged 3 commits into from
Mar 12, 2024

Conversation

ThibautBorn
Copy link
Contributor

add the option to set a max filesize to upload in a form

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

There are some pdb's in the code. This is why the tests fail. Actually, let me fix that myself. Done and pushed.

Tried on a new site: this works. Initially I get no validation errors, because no limit is set by default. When I set a low number in the registry and upload a file, I get a validation error. With a much higher number, upload works fine. So the basis is good. Thanks!.

On on existing site it fails with an exception:

plone.api.exc.InvalidParameterError: Cannot find a record with name 'easyform.max_filesize'

So this needs migration.

Also, this should be in the easyform control panel.

Copy link
Member

@gotcha gotcha left a comment

Choose a reason for hiding this comment

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

LGTM

Just need an entry in the CHANGES.rst changelog.

@ThibautBorn
Copy link
Contributor Author

added the Changes.rst and also updated locales (with extra dutch translations)

Copy link
Member

@gotcha gotcha left a comment

Choose a reason for hiding this comment

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

Thx

@thet thet merged commit a1da7c1 into master Mar 12, 2024
4 checks passed
@thet thet deleted the max_fileupload branch March 12, 2024 16:16
@mauritsvanrees
Copy link
Member

I have released this in 4.2.0.

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.

5 participants