The documentation at hackage.haskell.org/package/servant-multipart says about the main combinator type MultipartForm tag a
following:
Note that the behavior of this combinator is configurable, by using
serveWith
from servant-server instead ofserve
, which takes an additionalContext
argument. It simply is an heterogeneous list where you can for example store a value of typeMultipartOptions
that has the configuration that you want, which would then get picked up by servant-multipart.
And later:
data MultipartOptions tag
Global options for configuring how the server should handle multipart data.
generalOptions
lets you specify mostly multipart parsing related options, such as the maximum file size …
However, I don't understand how to correctly call the mentioned serveWithContext
:
serveWithContext
:: (HasServer api context, ServerContext context)
=> Proxy api
-> Context context
-> Server api
-> Application
Searching for its usage on GitHub also didn't enlighten me, unfortunately.