tapir
tapir copied to clipboard
Is there a simple way to limit upload body size
I currently have an endpoint taking an input of type multipartBody
for allowing my user to upload a file. But I would like to limit the max size in a way that my server cut the request before downloading more.
I found the following information:
- https://gitter.im/softwaremill/tapir?at=5fea4780c746c6431ce049a0
- https://github.com/softwaremill/tapir/pull/915 But there are a bit outdated. Is there an easy way to do that today? If not do you think contributing such a feature would be easy?
Some servers allow that at the server-settings level, but there's no tapir-wide setting for that (at least yet). Which server are you using?
http4s and yes I found EntityLimiter middleware, but I found it hard to apply to a single endpoint.