Class MultipartFormDataParser
- Namespace
- nanoFramework.WebServer.HttpMultipartParser
- Assembly
- nanoFramework.WebServer.dll
Provides methods to parse a
multipart/form-data
stream into it's parameters and file data.
public class MultipartFormDataParser
- Inheritance
-
MultipartFormDataParser
- Inherited Members
- Extension Methods
Constructors
MultipartFormDataParser(Stream, int, bool)
Initializes a new instance of the MultipartFormDataParser class
public MultipartFormDataParser(Stream stream, int binaryBufferSize = 4096, bool ignoreInvalidParts = false)
Parameters
stream
StreamThe stream containing the multipart data.
binaryBufferSize
intThe size of the buffer to use for parsing the multipart form data.
ignoreInvalidParts
boolBy default the parser will throw an exception if it encounters an invalid part. Set this to true to ignore invalid parts.
Properties
Files
Gets the mapping of parameters parsed files. The name of a given field maps to the parsed file data.
public FilePart[] Files { get; }
Property Value
- FilePart[]
Parameters
Gets the parameters. Several ParameterParts may share the same name.
public ParameterPart[] Parameters { get; }
Property Value
Methods
Parse(Stream, int, bool)
Parse the stream into a new instance of the MultipartFormDataParser class
public static MultipartFormDataParser Parse(Stream stream, int binaryBufferSize = 4096, bool ignoreInvalidParts = false)
Parameters
stream
StreamThe stream containing the multipart data.
binaryBufferSize
intThe size of the buffer to use for parsing the multipart form data.
ignoreInvalidParts
boolBy default the parser will throw an exception if it encounters an invalid part. Set this to true to ignore invalid parts.
Returns
- MultipartFormDataParser
A new instance of the MultipartFormDataParser class.