-
Notifications
You must be signed in to change notification settings - Fork 520
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
How to limit max upload size? #297
Comments
You mean with the multipart middleware? |
On jetty side, I have an endpoint which accepts octet-stream I want it to fail if it exceeds the limit. |
Also yes, multipart middleware |
@weavejester any suggestions? |
You can create a custom multipart store that limits the files to a certain size. Take a look at ring.middleware.multipart-params.temp-file and ring.middleware.multipart-params.byte-array. You can adapt or wrap these multipart stores to limit the size of the items. I don't currently have time to come up with an example for you, however. |
@weavejester thank you so much I think I figured it out! Are you gonna add this functionality to ring any time soon? That would be useful though |
When I get time, or someone sends me a PR, it would be useful functionality to have. |
Is there any way to limit max upload size? If so could you provide an example please?
The text was updated successfully, but these errors were encountered: