这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@danielgtaylor
Copy link
Owner

This makes multipart form parsing max memory usage configurable for most routers (Fiber does not have a memory limit for this feature). For example:

import "github.com/danielgtaylor/huma/v2/adapters/humachi"

// Allow up to 5 MiB per form submission.
humachi.MultipartMaxMemory = 5 * 1024 * 1024

Fixes #205.

@codecov
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f524213) 93.46% compared to head (dcd3d6f) 93.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   93.46%   93.46%           
=======================================
  Files          17       17           
  Lines        2187     2187           
=======================================
  Hits         2044     2044           
  Misses        105      105           
  Partials       38       38           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit c212880 into main Jan 24, 2024
@danielgtaylor danielgtaylor deleted the configure-multipart-max-mem branch January 24, 2024 18:01
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.

Allow file upload limit to be defined by the user

2 participants