Increasing the default payload size (for larger file uploads than 2Mb)

22 views
Skip to first unread message

Luke Evans

unread,
May 1, 2024, 3:17:40 AM5/1/24
to Yesod Web Framework
I'm running into what looks like the default request size for Yesod/Warp.
In the warp code I can see some 'middleware' stuff that seems like it would let me override the 2Mb default limit, but I'm not sure how I should introduce these new settings (or perhaps its a new or replacement middleware component) to my Yesod settings - which are only lightly modified from the yesod scaffolding in many of the basic WAI/Warp configuration.  

Do I have to create a requestSizeLimitMiddleware and then add it to the yesod middleware initialization in makeApplication?  Does this need to replace something else in the initialization, because the default 2Mb limit is clearly being expressed, presumably through some defaulting buried somewhere?

I'll continue trying to figure this out from looking at the sources, but would appreciate clue to speed up the solution.  Thanks! 


Luke Evans

unread,
May 1, 2024, 6:57:38 AM5/1/24
to Yesod Web Framework
Ah.  I found maximumContentLengthIO, which I had somehow missed, so didn't need to be scratching around with Warp settings and middleware at all!
Reply all
Reply to author
Forward
0 new messages