C# Class UnityEngine.Networking.MultipartFormFileSection

A helper object for adding file uploads to multipart forms via the [IMultipartFormSection] API.

Inheritance: IMultipartFormSection
ファイルを表示 Open project: CarlosHBC/UnityDecompiled

Public Methods

Method Description
MultipartFormFileSection ( byte data ) : System

Contains an anonymous file section based on the raw bytes from data, assigns a default Content-Type and file name.

MultipartFormFileSection ( string data, Encoding dataEncoding, string fileName ) : System

An anonymous file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default Content-Type.

MultipartFormFileSection ( string fileName, byte data ) : System

Contains an anonymous file section based on the raw bytes from data with a specific file name. Assigns a default Content-Type.

MultipartFormFileSection ( string name, byte data, string fileName, string contentType ) : System

Contains a named file section based on the raw bytes from data, with a custom Content-Type and file name.

MultipartFormFileSection ( string data, string fileName ) : System

An anonymous file section with data drawn from the UTF8 string data. Assigns a specific file name from fileName and a default Content-Type.

MultipartFormFileSection ( string name, string data, Encoding dataEncoding, string fileName ) : System

Contains a named file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default Content-Type.

Private Methods

Method Description
Init ( string name, byte data, string fileName, string contentType ) : void

Method Details

MultipartFormFileSection() public method

Contains an anonymous file section based on the raw bytes from data, assigns a default Content-Type and file name.

public MultipartFormFileSection ( byte data ) : System
data byte Raw contents of the file to upload.
return System

MultipartFormFileSection() public method

An anonymous file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default Content-Type.

public MultipartFormFileSection ( string data, Encoding dataEncoding, string fileName ) : System
data string Contents of the file to upload.
dataEncoding System.Text.Encoding A string encoding.
fileName string Name of the file uploaded by this form section.
return System

MultipartFormFileSection() public method

Contains an anonymous file section based on the raw bytes from data with a specific file name. Assigns a default Content-Type.

public MultipartFormFileSection ( string fileName, byte data ) : System
fileName string Name of the file uploaded by this form section.
data byte Raw contents of the file to upload.
return System

MultipartFormFileSection() public method

Contains a named file section based on the raw bytes from data, with a custom Content-Type and file name.

public MultipartFormFileSection ( string name, byte data, string fileName, string contentType ) : System
name string Name of this form section.
data byte Raw contents of the file to upload.
fileName string Name of the file uploaded by this form section.
contentType string The value for this section's Content-Type header.
return System

MultipartFormFileSection() public method

An anonymous file section with data drawn from the UTF8 string data. Assigns a specific file name from fileName and a default Content-Type.

public MultipartFormFileSection ( string data, string fileName ) : System
data string Contents of the file to upload.
fileName string Name of the file uploaded by this form section.
return System

MultipartFormFileSection() public method

Contains a named file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default Content-Type.

public MultipartFormFileSection ( string name, string data, Encoding dataEncoding, string fileName ) : System
name string Name of this form section.
data string Contents of the file to upload.
dataEncoding System.Text.Encoding A string encoding.
fileName string Name of the file uploaded by this form section.
return System