HttpMultipartParser::FilePart
Represents a single file extracted from a multipart/form-data stream.
Public Functions
Name | |
---|---|
FilePart(string name, string fileName, Stream data, string contentType =DefaultContentType, string contentDisposition =DontentDisposition) Initializes a new instance of the FilePart class. | |
FilePart(string name, string fileName, Stream data, IDictionary< string, string > additionalProperties, string contentType =DefaultContentType, string contentDisposition =DontentDisposition) Initializes a new instance of the FilePart class. |
Public Properties
Name | |
---|---|
Stream | Data Gets the data. |
string | FileName Gets the file name. |
string | Name Gets the name. |
string | ContentType Gets the content-type. Defaults to text/plain if unspecified. |
string | ContentDisposition Gets the content-disposition. Defaults to form-data if unspecified. |
IReadOnlyDictionary< string, string > | AdditionalProperties Gets the additional properties associated with this file. An additional property is any property other than the "well known" ones such as name, filename, content-type, etc. |
Public Functions Documentation
function FilePart
FilePart(
string name,
string fileName,
Stream data,
string contentType =DefaultContentType,
string contentDisposition =DontentDisposition
)
Initializes a new instance of the FilePart class.
Parameters:
- name The name of the input field used for the upload.
- fileName The name of the file.
- data The file data.
- contentType The content type.
- contentDisposition The content disposition.
function FilePart
FilePart(
string name,
string fileName,
Stream data,
IDictionary< string, string > additionalProperties,
string contentType =DefaultContentType,
string contentDisposition =DontentDisposition
)
Initializes a new instance of the FilePart class.
Parameters:
- name The name of the input field used for the upload.
- fileName The name of the file.
- data The file data.
- additionalProperties Additional properties associated with this file.
- contentType The content type.
- contentDisposition The content disposition.
Public Property Documentation
property Data
Stream Data;
Gets the data.
property FileName
string FileName;
Gets the file name.
property Name
string Name;
Gets the name.
property ContentType
string ContentType;
Gets the content-type. Defaults to text/plain if unspecified.
property ContentDisposition
string ContentDisposition;
Gets the content-disposition. Defaults to form-data if unspecified.
property AdditionalProperties
IReadOnlyDictionary< string, string > AdditionalProperties;
Gets the additional properties associated with this file. An additional property is any property other than the "well known" ones such as name, filename, content-type, etc.