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

Adding capability to take max upload size per request. #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nucleussoftwareopen
Copy link

As of now FileUploadBase has sizeMax which is global for all uploads, in many cases it is required to calculate this limit based on request.

https://stackoverflow.com/questions/16585866/changing-file-size-limit-maxuploadsize-depending-on-the-controller

@jochenw
Copy link
Contributor

jochenw commented Dec 20, 2022

Hi, thanks for the PR. I'd like to understand, what this is about, or in other words: What is the use case?

In my opinion, if there really is a request, that needs special handling: Why not just create another controller?

Thanks,

Jochen

@garydgregory
Copy link
Member

-1, there should be tests along with new features.

@jochenw
Copy link
Contributor

jochenw commented Dec 20, 2022

A valid point, Gary, I'll keep that in mind. Besides: Please, rebase.

@nucleussoftwareopen
Copy link
Author

Hi, Thanks for sharing your thoughts & reviews.
In this PR we are introducing a new functionality which allows a user to get the allowed max size for current file upload. Also, the subclasses can override the newly introduced getSizeMaxForThisRequest() method to calculate the allowed size per request.
This will help users to provide granularity in the allowed max size for the files uploaded via different requests against different requirements/ use-cases.

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