Allow setting multer::Multipart constraints #1623
Labels
A-axum
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
S-blocked
Status: marked as blocked ❌ on something else such as a PR or other implementation work.
Feature Request
Motivation
I'm running into a
length limit exceeded
error from multer when trying to read a file coming in from a Multipart form. Multer supportsConstraints
to avoid this, but axum's multipart extractor does not allow forwarding these.Proposal
I'm not super sure how this could be implemented, since the constraints can't be passed through the parameter typing. Either there might need to be some documented recommended way of parsing the request manually inside the handler, or maybe the multipart extractor needs to be a bit fancier to allow passing constraints.
Alternatives
For now, I'll "vendor" the Multipart extractor, since it seems simple enough, to add that functionality, but it seems like something axum's native extractor should support.
The text was updated successfully, but these errors were encountered: