# FileUploadConfig Type documentation

## TypeScript declaration

### [FileUploadConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L49-L73>)

**Kind:** interface

```
import type { FileUploadConfig } from '@siemens/element-ng/file-uploader';
```

```
interface FileUploadConfig
```

#### Properties

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead> <tbody><tr id="t:FileUploadConfig.additionalFields"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L63-L63">additionalFields</a> (optional)</td> <td class="api-column-type"><code>Record&lt;<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>&gt;</code></td> <td class="api-column-description"><p>Additional form fields added in the HTTP request.</p><p>Example:</p><pre><code class="language-json">{ upload_user: 'Reiner Zufall', expiry_date: ' 21.12.2012' }</code></pre></td></tr><tr id="t:FileUploadConfig.fieldName"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L54-L54">fieldName</a></td> <td class="api-column-type"><code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></td> <td class="api-column-description"><p>Form field name for the uploaded file.</p></td></tr><tr id="t:FileUploadConfig.handler"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L67-L67">handler</a> (optional)</td> <td class="api-column-type"><code>((req: <a href="https://angular.dev/api/common/http/HttpRequest">HttpRequest</a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown">unknown</a>&gt;) =&gt; <a href="https://rxjs.dev/api/index/class/Observable">Observable</a>&lt;<a href="https://angular.dev/api/common/http/HttpEvent">HttpEvent</a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown">unknown</a>&gt;&gt;)</code></td> <td class="api-column-description"><p>A function to modify the HTTP request sent on the consumer side.</p></td></tr><tr id="t:FileUploadConfig.headers"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L50-L50">headers</a></td> <td class="api-column-type"><code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://angular.dev/api/common/http/HttpHeaders">HttpHeaders</a> | Record&lt;<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> | (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)[]&gt; | <a href="https://developer.mozilla.org/docs/Web/API/Headers">Headers</a></code></td> <td class="api-column-description"></td></tr><tr id="t:FileUploadConfig.method"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L51-L51">method</a></td> <td class="api-column-type"><code>&quot;POST&quot; | &quot;PUT&quot; | &quot;PATCH&quot;</code></td> <td class="api-column-description"></td></tr><tr id="t:FileUploadConfig.responseType"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L65-L65">responseType</a> (optional)</td> <td class="api-column-type"><code>&quot;arraybuffer&quot; | &quot;blob&quot; | &quot;json&quot; | &quot;text&quot;</code></td> <td class="api-column-description"><p>Specify the server response type</p></td></tr><tr id="t:FileUploadConfig.sendBinary"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L72-L72">sendBinary</a> (optional)</td> <td class="api-column-type"><code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></td> <td class="api-column-description"><p>When <code>true</code>, the file will be sent directly w/o the use of <code>FormData</code>. You will also need to set the <code>Content-Type</code> header when sending binary. See: <a href="index.html#t:FileUploadConfig.headers">headers</a></p></td></tr><tr id="t:FileUploadConfig.url"> <td class="api-column-name"><a href="https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L52-L52">url</a></td> <td class="api-column-type"><code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code></td> <td class="api-column-description"></td></tr></tbody></table>
