What is the way to implement a file upload API with Servant?
I am trying to handle "standard" multipart/form-data but cannot figure out how to declare it in Servant.
This obviously doesn't work as it cannot handle multiparts:
type API = "file" :> ReqBody '[OctetStream] ByteString :> Post '[OctetStream] ()
Does Servant support file uploads?
This combinator works well. Just put it in a file in your app. https://github.com/haskell-servant/servant/issues/133#issuecomment-125235662
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With