Parse "multipart/form-data" based on RFC 2388: http://tools.ietf.org/html/rfc2388
- data FormData = FormData {
- fdFileName :: !(Maybe Text)
- fdMIMEType :: !MIMEType
- fdContent :: !ByteString
- parseMultipartFormData :: Ascii -> ByteString -> Either String [(Ascii, FormData)]
Documentation
FormData
represents a form value and possibly an uploaded file
name.
FormData | |
|
Parse "multipart/form-data" to a list of (name,
formData)
. Note that there are currently the following
limitations:
- Multiple files embedded as "multipart/mixed" within the "multipart/form-data" won't be decomposed.
- "Content-Transfer-Encoding" is always ignored.
- RFC 2388 (http://tools.ietf.org/html/rfc2388#section-3) says that non-ASCII field names are encoded according to the method in RFC 2047 (http://tools.ietf.org/html/rfc2047), but this function currently doesn't decode them.