Comments (3)
@JanRuettinger I'm trying to figure out what to do for this. Your suggestion would be a breaking change for the interface (which we should avoid). Adding another function that takes the argument is another possibility, but again that makes the huma.Context
interface more complicated or makes you cast the context to see if it supports that new feature... 🤔
Is it important that you configure this on a per-call basis? I'm thinking alternatively we expose it as a public value in the package so you can set it to whatever you like as the max, e.g. var MultipartMaxMemory = 8 * 1024
and then you could do this in your code as part of service start up: humachi.MultipartMaxMemory = 2 * 1024 * 1024
.
from huma.
What do you think about adding a parameter to the GetMultipartForm
function that allows the user to set the upload limit?
func (c *chiContext) GetMultipartForm(uploadLimit int) (*multipart.Form, error) {
err := c.r.ParseMultipartForm(uploadLimit)
return c.r.MultipartForm, err
}
from huma.
Yes agree, the proposed solution breaks the interface.
Exposing the limit as a public value would solve the problem for me!
from huma.
Related Issues (20)
- Support Discriminator and DiscriminatorMap HOT 2
- Setting headers in error response HOT 6
- Add more tests for cookie HOT 3
- Add custom header from SSE Handler HOT 3
- How should nullable query params be handled without pointers? HOT 4
- Add support for netip.Addr HOT 1
- Forwarding headers through the middleware not working HOT 5
- Override ErrorModel for single operations HOT 6
- Feature: Accept valueless path/query/header/cookie tags
- Docs UI doesn't handle multiple cookies properly HOT 1
- Allow custom Transform for nested objects HOT 2
- Error thrown when setting cli name HOT 2
- Error return for huma.StreamResponse.Body HOT 1
- Schema(r huma.Registry) *huma.Schema not working on Pointer
- Validation errors localization HOT 2
- Question: Is there a way to add comments to fields? HOT 1
- Version Chi v4 Into Separate Release
- Removing schema reference in response HOT 2
- Multiline doc description for struct fields
- Bug: API doc hidden is not *real* hidden HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huma.