Giter Club home page Giter Club logo

Comments (3)

danielgtaylor avatar danielgtaylor commented on May 13, 2024 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.

JanRuettinger avatar JanRuettinger commented on May 13, 2024

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.

JanRuettinger avatar JanRuettinger commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.