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.
DispositionFormData :: PartDispositionsnap-core Snap.Util.FileUploads Content-Disposition: form-data.
doProcessFormInputs :: UploadPolicy -> Boolsnap-core Snap.Util.FileUploads Does this upload policy stipulate that we want to treat parts without filenames as form input?
getMaximumFormInputSize :: UploadPolicy -> Int64snap-core Snap.Util.FileUploads Get the maximum size of a form input which will be read into our rqParams map.
getMaximumNumberOfFormInputs :: UploadPolicy -> Intsnap-core Snap.Util.FileUploads Get the maximum size of a form input which will be read into our rqParams map.
-
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)
setMaximumFormInputSize :: Int64 -> UploadPolicy -> UploadPolicysnap-core Snap.Util.FileUploads Set the maximum size of a form input which will be read into our rqParams map.
setMaximumNumberOfFormInputs :: Int -> UploadPolicy -> UploadPolicysnap-core Snap.Util.FileUploads Set the maximum size of a form input which will be read into our rqParams map.
setProcessFormInputs :: Bool -> UploadPolicy -> UploadPolicysnap-core Snap.Util.FileUploads Set the upload policy for treating parts without filenames as form input.
-
snap-core Snap.Util.Proxy Use the Forwarded-For or X-Forwarded-For header
transformBi :: Biplate from to => (to -> to) -> from -> fromuniplate Data.Generics.Biplate No documentation available.