# MultipartFormFileSection

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

## Definition

* **Type:** Class
* **Namespace:** [UnityEngine.Networking](/engine/6000.6/script-reference/unityengine/networking.md)
* **Assembly:** UnityEngine.UnityWebRequestModule
* **Implements:** [IMultipartFormSection](/engine/6000.6/script-reference/unityengine/networking/imultipartformsection.md)

```csharp
public class MultipartFormFileSection : IMultipartFormSection
```

## Remarks

This object is similar to the [MultipartFormDataSection](/engine/6000.6/script-reference/unityengine/networking/multipartformdatasection.md) object, but all constructors additionally accept (and require) a `fileName` parameter. If you omit the `fileName` parameter, this object provides a default filename.

## Constructors

| Constructor                                                                                                                                                                                                                                   | Description                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [MultipartFormFileSection(System.Byte\[\])](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(byte\))                                                                         | Contains an anonymous file section based on the raw bytes from `data`, assigns a default `Content-Type` and file name.                                                |
| [MultipartFormFileSection(System.String,System.Byte\[\])](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(string-byte\))                                                    | Contains an anonymous file section based on the raw bytes from `data` with a specific file name. Assigns a default `Content-Type`.                                    |
| [MultipartFormFileSection(System.String,System.Byte\[\],System.String,System.String)](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(string-byte-string-string\))          | Contains a named file section based on the raw bytes from `data`, with a custom `Content-Type` and file name.                                                         |
| [MultipartFormFileSection(System.String,System.String)](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(string-string\))                                                    | 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(System.String,System.String,System.Text.Encoding,System.String)](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(string-string-encoding-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 `Content-Type`. |
| [MultipartFormFileSection(System.String,System.Text.Encoding,System.String)](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/ctor.md#multipartformfilesection\(string-encoding-string\))                      | 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`.     |

## Properties

| Property                                                                                                      | Description                                                                                         |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [contentType](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/contenttype.md) | Returns the value of the section's `Content-Type` header.                                           |
| [fileName](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/filename.md)       | Returns a string denoting the desired filename of this section on the destination server.           |
| [sectionData](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/sectiondata.md) | Returns the raw binary data contained in this section. Will not return null or a zero-length array. |
| [sectionName](/engine/6000.6/script-reference/unityengine/networking/multipartformfilesection/sectionname.md) | Returns the name of this section, if any.                                                           |
