servant-multipart-client 0.12.1 → 0.12.2
raw patch · 3 files changed
+26/−8 lines, 3 filesdep ~bytestringdep ~networkdep ~servant
Dependency ranges changed: bytestring, network, servant, servant-client-core, text
Files
- CHANGELOG.md +5/−0
- servant-multipart-client.cabal +19/−6
- src/Servant/Multipart/Client.hs +2/−2
CHANGELOG.md view
@@ -1,3 +1,8 @@+0.12.2+------++- Support servant-0.20 [#69](https://github.com/haskell-servant/servant-multipart/pull/69).+ 0.12.1 ------
servant-multipart-client.cabal view
@@ -1,5 +1,5 @@ name: servant-multipart-client-version: 0.12.1+version: 0.12.2 synopsis: multipart/form-data (e.g file upload) support for servant description: This package adds client-side support for file upload to the servant ecosystem.@@ -14,7 +14,13 @@ build-type: Simple cabal-version: >=1.10 extra-source-files: CHANGELOG.md-tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.4+tested-with:+ GHC ==8.6.5+ || ==8.8.4+ || ==8.10.7+ || ==9.0.2+ || ==9.2.8+ || ==9.4.7 library default-language: Haskell2010@@ -25,16 +31,23 @@ build-depends: array >=0.5.1.1 && <0.6 , base >=4.9 && <5- , bytestring >=0.10.8.1 && <0.11- , text >=1.2.3.0 && <1.3+ , bytestring >=0.10.8.1 && <0.12+ , text >=1.2.3.0 && <2.1 , random >=0.1.1 && <1.3 -- other dependencies build-depends: servant-multipart-api == 0.12.* , http-media >=0.7.1.3 && <0.9- , servant >=0.16 && <0.19- , servant-client-core >=0.16 && <0.19+ , servant >=0.16 && <0.21+ , servant-client-core >=0.16 && <0.21++ -- servant-0.19 dropped support for GHC-8.4 (latest GHCJS version),+ -- due to QuantifiedConstraints+ if impl(ghcjs)+ build-depends:+ servant >=0.16 && <0.19+ , servant-client-core >=0.16 && <0.19 executable upload hs-source-dirs: exe
src/Servant/Multipart/Client.hs view
@@ -74,7 +74,7 @@ readHandle hdl = fromActionStep LBS.null (LBS.hGet hdl 4096) instance MultipartClient Mem where- loadFile _ = source . pure+ loadFile _ = source . pure @[] -- | Generates a boundary to be used to separate parts of the multipart. -- Requires 'IO' because it is randomized.@@ -132,7 +132,7 @@ renderInput input = renderPart (lencode . iName $ input) "text/plain" ""- (source . pure . lencode . iValue $ input)+ (source . pure @[] . lencode . iValue $ input) inputs' = foldl' (\acc x -> acc `mappend'` renderInput x) mempty' (inputs mp) renderFile :: FileData tag -> SourceIO LBS.ByteString renderFile file = renderPart (lencode . fdInputName $ file)