haskell-servant / haskell-servant/servant-multipart

How do I increase maximum amount of files per request?

Open
#57 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
40
Forks
42
PR merge metrics
No merged PRs in 30d

Description

After implementing a tiny service I realized that there is a limit of maximum amount of files which is just 10 files.

I found this option https://hackage.haskell.org/package/wai-extra-3.1.6/docs/Network-Wai-Parse.html#v:setMaxRequestNumFiles and was trying to figure out how to apply it using *servant-multipart*. I found here https://hackage.haskell.org/package/servant-multipart-0.12.1/docs/src/Servant.Multipart.html that it uses `defaultMultipartOptions` which has `defaultParseRequestBodyOptions` which I probably want to modify here.

I was trying to implement overlapping `HasServer (MultipartForm' mods tag a :> sublayout) config` instance but it turns out it uses some functions that are not exported from `Servant.Multipart`. It’s getting trickier. Is there any way to override `ParseRequestBodyOptions` for that instance?

See also: https://github.com/yesodweb/wai/issues/855

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Servant.Multipart, especially defaultMultipartOptions, defaultParseRequestBodyOptions, and the HasServer instance for MultipartForm'. Review the linked wai issue and determine whether ParseRequestBodyOptions can be overridden without relying on unexported functions; done means a supported way to raise the maximum file count is identified or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.