MultipartFormFileSection
A helper object for adding file uploads to multipart forms via the [IMultipartFormSection] API.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Class
- Namespace: UnityEngine.Networking
- Assembly: UnityEngine.UnityWebRequestModule
- Implements: IMultipartFormSection
public class MultipartFormFileSection : IMultipartFormSection
Remarks
This object is similar to the MultipartFormDataSection object, but all constructors additionally accept (and require) a parameter. If you omit the parameter, this object provides a default filename.
fileNamefileNameConstructors
Constructor | Description |
|---|---|
| MultipartFormFileSection(System.Byte[]) | Contains an anonymous file section based on the raw bytes from data, assigns a default |
| MultipartFormFileSection(System.String,System.Byte[]) | Contains an anonymous file section based on the raw bytes from data with a specific file name. Assigns a default |
| MultipartFormFileSection(System.String,System.Byte[],System.String,System.String) | Contains a named file section based on the raw bytes from data, with a custom |
| MultipartFormFileSection(System.String,System.String) | An anonymous file section with data drawn from the UTF8 string data. Assigns a specific file name from fileName and a default |
| MultipartFormFileSection(System.String,System.String,System.Text.Encoding,System.String) | Contains a named file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default |
| MultipartFormFileSection(System.String,System.Text.Encoding,System.String) | An anonymous file section with data drawn from data, as marshaled by dataEncoding. Assigns a specific file name from fileName and a default |
Properties
Property | Description |
|---|---|
| contentType | Returns the value of the section's |
| fileName | Returns a string denoting the desired filename of this section on the destination server. |
| sectionData | Returns the raw binary data contained in this section. Will not return null or a zero-length array. |
| sectionName | Returns the name of this section, if any. |