Hoogle Search

Within LTS Haskell 24.39 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. DispositionFormData :: PartDisposition

    snap-core Snap.Util.FileUploads

    Content-Disposition: form-data.

  2. doProcessFormInputs :: UploadPolicy -> Bool

    snap-core Snap.Util.FileUploads

    Does this upload policy stipulate that we want to treat parts without filenames as form input?

  3. getMaximumFormInputSize :: UploadPolicy -> Int64

    snap-core Snap.Util.FileUploads

    Get the maximum size of a form input which will be read into our rqParams map.

  4. getMaximumNumberOfFormInputs :: UploadPolicy -> Int

    snap-core Snap.Util.FileUploads

    Get the maximum size of a form input which will be read into our rqParams map.

  5. handleFormUploads :: MonadSnap m => UploadPolicy -> FileUploadPolicy -> (PartInfo -> InputStream ByteString -> IO a) -> m ([FormParam], [FormFile a])

    snap-core Snap.Util.FileUploads

    Processes form data and calls provided storage function on file parts. You can use this together with withTemporaryStore, storeAsLazyByteString or provide your own callback to store uploaded files. If you need to process uploaded file mime type or file name, do it in the store callback function. See also foldMultipart. Example using with small files which can safely be stored in memory.

    import qualified Data.ByteString.Lazy as Lazy
    
    handleSmallFiles :: MonadSnap m => [(ByteString, ByteString, Lazy.ByteString)]
    handleSmallFiles = handleFormUploads uploadPolicy filePolicy store
    
    where
    uploadPolicy = defaultUploadPolicy
    filePolicy = setMaximumFileSize (64*1024)
    $ setMaximumNumberOfFiles 5
    defaultUploadPolicy
    store partInfo stream = do
    content <- storeAsLazyByteString partInfo stream
    let
    fileName = partFileName partInfo
    fileMime = partContentType partInfo
    in (fileName, fileMime, content)
    

  6. setMaximumFormInputSize :: Int64 -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the maximum size of a form input which will be read into our rqParams map.

  7. setMaximumNumberOfFormInputs :: Int -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the maximum size of a form input which will be read into our rqParams map.

  8. setProcessFormInputs :: Bool -> UploadPolicy -> UploadPolicy

    snap-core Snap.Util.FileUploads

    Set the upload policy for treating parts without filenames as form input.

  9. X_Forwarded_For :: ProxyType

    snap-core Snap.Util.Proxy

    Use the Forwarded-For or X-Forwarded-For header

  10. transformBi :: Biplate from to => (to -> to) -> from -> from

    uniplate Data.Generics.Biplate

    No documentation available.

Page 582 of many | Previous | Next