Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warp: How to increase maximum number of files? #855

Closed
unclechu opened this issue Sep 29, 2021 · 4 comments
Closed

Warp: How to increase maximum number of files? #855

unclechu opened this issue Sep 29, 2021 · 4 comments

Comments

@unclechu
Copy link

Hey, I’ve implemented a file uploading via multipart/form-data using Warp & Servant but now I’m getting this exception when I’m selecting more than a few files:

Maximum number of files exceeded
CallStack (from HasCallStack):
  error, called at ./Network/Wai/Parse.hs:534:29 in wai-extra-3.1.6-22LSJkkgAfcGyKEssmjhv:Network.Wai.Parse

How can I increase this maximum number of files for Warp?

@snoyberg
Copy link
Member

You'd need to change the settings with something like this:

https://www.stackage.org/haddock/lts-18.12/wai-extra-3.1.6/Network-Wai-Parse.html#v:setMaxRequestNumFiles

@unclechu
Copy link
Author

@snoyberg Yeah, I found this one earlier. But it isn’t obvious for me looking at the Warp’s API how would I use it there.

@unclechu
Copy link
Author

Ah, I think I should look into the Servant library I’m using:

https://hackage.haskell.org/package/servant-multipart-0.12.1/docs/src/Servant.Multipart.html

@unclechu
Copy link
Author

unclechu commented Oct 5, 2021

I’m closing this issue since it was misaddressed. I wanted to actually know how to customize that option for servant-multipart library specifically.

Here is the following discussion: haskell-servant/servant-multipart#57

@unclechu unclechu closed this as completed Oct 5, 2021
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

No branches or pull requests

2 participants