Table of Contents

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 Stream

The stream containing the multipart data.

binaryBufferSize int

The size of the buffer to use for parsing the multipart form data.

ignoreInvalidParts bool

By 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

ParameterPart[]

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 Stream

The stream containing the multipart data.

binaryBufferSize int

The size of the buffer to use for parsing the multipart form data.

ignoreInvalidParts bool

By 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.