@@ -256,9 +256,9 @@ instance ( FromMultipart tag a
256
256
-- that allows us to properly clean up the temporary files
257
257
-- later on.
258
258
check :: MultipartBackend tag => Proxy tag -> MultipartOptions tag -> DelayedIO (MultipartData tag )
259
- check prx tag = withRequest $ \ request -> do
259
+ check pTag tag = withRequest $ \ request -> do
260
260
st <- liftResourceT getInternalState
261
- rawData <- liftIO $ parseRequestBodyEx parseOpts (backend prx (options tag) st) request
261
+ rawData <- liftIO $ parseRequestBodyEx parseOpts (backend pTag (options tag) st) request
262
262
return (fromRaw rawData)
263
263
where parseOpts = generalOptions tag
264
264
@@ -268,14 +268,14 @@ addMultipartHandling :: forall tag multipart env a. (FromMultipart tag multipart
268
268
-> MultipartOptions tag
269
269
-> Delayed env (multipart -> a )
270
270
-> Delayed env a
271
- addMultipartHandling prx opts subserver =
271
+ addMultipartHandling pTag opts subserver =
272
272
addBodyCheck subserver contentCheck bodyCheck
273
273
where
274
274
contentCheck = withRequest $ \ request ->
275
275
fuzzyMultipartCTCheck (contentTypeH request)
276
276
277
277
bodyCheck () = do
278
- mpd <- check prx opts :: DelayedIO (MultipartData tag )
278
+ mpd <- check pTag opts :: DelayedIO (MultipartData tag )
279
279
case fromMultipart mpd of
280
280
Nothing -> liftRouteResult $ FailFatal
281
281
err400 { errBody = " fromMultipart returned Nothing" }
@@ -345,14 +345,11 @@ instance MultipartBackend Tmp where
345
345
346
346
instance MultipartBackend Mem where
347
347
type MultipartResult Mem = LBS. ByteString
348
- type MultipartBackendOptions Mem = LbsBackendOptions
348
+ type MultipartBackendOptions Mem = ()
349
349
350
- defaultBackendOptions _ = LbsBackendOptions
350
+ defaultBackendOptions _ = ()
351
351
backend _ opts _ = lbsBackEnd
352
352
353
- -- | TODO: write me
354
- data LbsBackendOptions = LbsBackendOptions
355
-
356
353
-- | Configuration for the temporary file based backend.
357
354
--
358
355
-- You can configure the way servant-multipart gets its hands
@@ -378,9 +375,9 @@ defaultTmpBackendOptions = TmpBackendOptions
378
375
-- Uses 'defaultParseRequestBodyOptions' and
379
376
-- 'defaultTmpBackendOptions' respectively.
380
377
defaultMultipartOptions :: MultipartBackend tag => Proxy tag -> MultipartOptions tag
381
- defaultMultipartOptions prx = MultipartOptions
378
+ defaultMultipartOptions pTag = MultipartOptions
382
379
{ generalOptions = defaultParseRequestBodyOptions
383
- , options = defaultBackendOptions prx
380
+ , options = defaultBackendOptions pTag
384
381
}
385
382
386
383
-- Utility class that's like HasContextEntry
0 commit comments