# File uploader

The **file uploader** component allows users to upload one or more files, such as images, documents or firmware. It shows the upload progress as well as a success/error status after an upload finishes.

## Usage

The file uploader allows to upload file-based content. They are typically integrated in forms but can also be used in a standalone fashion.

Users can upload files by dragging and dropping them into the designated drop area. Alternatively, users can also use a browser's/OS' native file selection dialog by clicking the upload link within the drop zone.

![File uploader](<../images/file-uploader.png>)

## Design

### Elements

![File uploader elements](<../images/file-uploader-elements.png>)

> \\1. File selector/drop zone, 2. File upload progress, 3. Cancel file upload button, 4. Upload issue feedback, 5. Upload successful icon , 6. Retry button, 7. Delete file button, 8. Actions (optional)

### Upload states

![File uploader states](<../images/file-uploader-states.png>)

### Variants

The file uploader is available in two variants, either as just the file selector alone without any status or interaction controls or as the complete variant with file list and all other state management handling.

![File uploader variants](<../images/file-uploader-variants.png>)

The component can be set to either a fixed height or it supports a dynamically growing one to accommodate a longer list of uploaded files. When set to a fix height, the additional files might be hidden and users have to scroll to see them.

## Code

This component can be used to upload a file. Either via file browser or using drag and drop. It also shows you if the upload was successful or has failed. In the case that it was successful, you will be provided with the output emitter `uploadFinished`.

### Usage

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

@Component({
  imports: [SiFileUploaderComponent, ...]
})
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { HttpHeaders } from '@angular/common/http';
import { Component, inject } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { FileUploadConfig, SiFileUploaderComponent } from '@siemens/element-ng/file-uploader';
import { SiFormItemComponent } from '@siemens/element-ng/form';
import { SiNumberInputComponent } from '@siemens/element-ng/number-input';
import { LOG_EVENT } from '@siemens/live-preview';

import { FileUploadInterceptor } from './file-upload-interceptor';

@Component({
  selector: 'app-sample',
  imports: [FormsModule, SiFileUploaderComponent, SiFormItemComponent, SiNumberInputComponent],
  templateUrl: './si-file-uploader.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  readonly logEvent = inject(LOG_EVENT);
  readonly fileUploadInterceptor = inject(FileUploadInterceptor);
  readonly uploadConfig: FileUploadConfig = {
    method: 'POST',
    url: 'api/file-upload',

    headers: new HttpHeaders({ 'Accept': 'application/json' }),
    fieldName: 'upload_file',
    responseType: 'json'
  };

  maxFileSizeInBytes = 524_288; // 0.5mb
  showHttpError = false;
  hasMaxHeight = false;
  autoUpload = false;
  directoryUpload = false;
  maxFiles = 10;
  maxConcurrentUploads = 3;
}
```

Template:

```html
<div class="card">
  <si-file-uploader
    class="card-body"
    accept="image/*"
    [style.max-height.px]="hasMaxHeight ? 400 : null"
    [uploadConfig]="uploadConfig"
    [maxFileSize]="maxFileSizeInBytes"
    [maxFiles]="maxFiles"
    [maxConcurrentUploads]="maxConcurrentUploads"
    [showHttpError]="showHttpError"
    [autoUpload]="autoUpload"
    [directoryUpload]="directoryUpload"
    (uploadCanceled)="logEvent('canceled', $event)"
    (uploadCompleted)="logEvent('completed', $event)"
  />
</div>

<div class="row mt-6 e2e-ignore">
  <div class="col-md-6 mb-6">
    <div class="card">
      <div class="card-header">si-file-uploader settings</div>
      <div class="card-body">
        <si-form-item label="Show HTTP error">
          <input type="checkbox" class="form-check-input" [(ngModel)]="showHttpError" />
        </si-form-item>
        <si-form-item label="Auto-upload mode">
          <input type="checkbox" class="form-check-input" [(ngModel)]="autoUpload" />
        </si-form-item>
        <si-form-item label="Upload directory">
          <input type="checkbox" class="form-check-input" [(ngModel)]="directoryUpload" />
        </si-form-item>
        <si-form-item label="Max. files">
          <si-number-input class="form-control" [(ngModel)]="maxFiles" />
        </si-form-item>
        <si-form-item label="Max. concurrent uploads">
          <si-number-input class="form-control" [(ngModel)]="maxConcurrentUploads" />
        </si-form-item>
      </div>
    </div>
  </div>
  <div class="col-md-6 mb-6">
    <div class="card">
      <div class="card-header">Demo settings</div>
      <div class="card-body">
        <si-form-item label="Upload shall fail">
          <input
            type="checkbox"
            class="form-check-input"
            [(ngModel)]="fileUploadInterceptor.uploadShallFail"
          />
        </si-form-item>
        <si-form-item label="Fail two uploads and let the third try succeed">
          <input
            type="checkbox"
            class="form-check-input"
            [disabled]="fileUploadInterceptor.uploadShallFail"
            [(ngModel)]="fileUploadInterceptor.thirdTrySuccess"
          />
        </si-form-item>
        <si-form-item label="Set a max-height">
          <input type="checkbox" class="form-check-input" [(ngModel)]="hasMaxHeight" />
        </si-form-item>
        <si-form-item label="No delay">
          <input
            type="checkbox"
            class="form-check-input"
            [(ngModel)]="fileUploadInterceptor.noDelay"
          />
        </si-form-item>
      </div>
    </div>
  </div>
</div>
```

It's also possible to have only the file selector / drop zone part without the file list.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component } from '@angular/core';
import { SiFileDropzoneComponent, UploadFile } from '@siemens/element-ng/file-uploader';

@Component({
  selector: 'app-sample',
  imports: [SiFileDropzoneComponent],
  templateUrl: './si-file-dropzone.html',
  host: { class: 'p-5' }
})
export class SampleComponent {
  maxFileSizeInBytes = 524_288; // 0.5mb
  files: UploadFile[] = [];
}
```

Template:

```html
<div class="card">
  <si-file-dropzone
    class="card-body"
    accept="image/*"
    [maxFileSize]="maxFileSizeInBytes"
    (filesAdded)="files = $event"
  />
</div>

<div class="card mt-6 e2e-ignore">
  <div class="card-body">
    Files
    <ul>
      @for (file of files; track file) {
        <li>
          <b>name</b>: {{ file.fileName }}
          <br />
          <b>size</b>: {{ file.size }}
          <br />
          <b>state</b>: {{ file.status }}
          <br />
          <b>errorText</b>: {{ file.errorText }}
        </li>
      }
    </ul>
  </div>
</div>
```

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

**Kind:** component

**Selector:** `si-file-uploader`

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

```
component SiFileUploaderComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [accept](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L261-L261>) | `string \| undefined` |  | Define which file types are suggested in file browser.<br><br>See: [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\#attr-accept](<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept>) |
| [acceptText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L138-L140>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ACCEPTED_FILE_TYPES:Accepted file types: {{accept}}.` `` | Text for the accepted file types. |
| [autoUpload](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L293-L293>) | `boolean` | `false` | Auto-upload mode - automatically start upload once files are added. |
| [cancelButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L185-L185>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.CANCEL:Cancel` `` | Text of cancel button. Shown during upload. Required for a11y. |
| [clearButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L158-L158>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.CLEAR:Clear` `` | Text used inside the clear button. |
| [directoryUpload](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L311-L311>) | `boolean` | `false` | Enable directory upload mode. When enabled, the file input will accept directories and upload all files within as a flat list. The hierarchy of the directory will not be preserved. The `maxFiles` property will have no effect when `directoryUpload` is enabled.<br><br>**Note:** This feature is not yet available for safari (iOS) |
| [disableUpload](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L299-L299>) | `boolean` | `false` | Disable the upload button. |
| [errorTextFileMaxSize](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L233-L235>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:Max. {{maxFileSize}}` `` | Message or translation key if file exceeds the maximum file size limit. |
| [errorTextFileType](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L222-L224>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_TYPE:Invalid file type` `` | Text shown to indicate that an incorrect file type was added to file list. |
| [errorUploadFailed](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L205-L207>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.UPLOAD_FAILED:Upload failed` `` | Text shown if the upload failed. |
| [maxConcurrentUploads](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L281-L281>) | `number` | `3` | Maximum number of concurrent uploads. |
| [maxFiles](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L275-L275>) | `number` | `10` | Define maximal allowed number of files. When [directoryUpload](<index.html#SiFileUploaderComponent.directoryUpload>) is enabled, this will have no effect. |
| [maxFileSize](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L267-L269>) | `number` | `undefined` | Define maximal allowed file size in bytes. |
| [maxFileSizeText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L116-L118>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.MAX_SIZE:Upload max. {{maxFileSize}}` `` | Text to describe the maximum file size. |
| [maxFilesReachedText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L127-L129>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.MAX_FILE_REACHED:Max. {{maxFiles}} files` `` | Error message shown when the maximum number of files are reached. |
| [removeButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L176-L176>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.REMOVE:Remove` `` | Text shown to remove a file from the file list. Required for a11y. |
| [retries](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L287-L287>) | `number` | `0` | Numbers of retries for failed uploads. |
| [showHttpError](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L213-L213>) | `boolean` | `false` | On failed upload, show the error received from the server. |
| [successTextTitle](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L194-L196>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.UPLOAD_COMPLETED:Upload completed` `` | Text shown if the upload was successful. |
| [uploadButtonText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L149-L149>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.UPLOAD:Upload` `` | Text used inside the upload button. |
| [uploadConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L250-L256>) | `FileUploadConfig` | `{     headers: new HttpHeaders({ 'Accept': 'application/json' }),     method: 'POST',     url: '',     fieldName: 'upload_file',     responseType: 'json'   }` | Config for HTTP request to upload file. |
| [uploadDropText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L105-L107>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.DROP:Drop files here or click to upload` `` | Text instructing a user to drop the files inside the dropzone. |
| [uploadingText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L167-L167>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.UPLOADING:Uploading` `` | Text shown during the file upload. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [filesChanges](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L327-L327>) | `UploadFile[]` | Output which fires whenever new files are added to or removed from the uploader. |
| [uploadCanceled](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L316-L316>) | `UploadFile` | Emits when a user press cancel during upload. The event provides the file details. |
| [uploadCompleted](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L322-L322>) | `FileUploadResult` | Output callback event will provide you if upload is finished. If an error occurred it will be emitted. |

#### Attributes and Methods

##### fileUpload

[Source for fileUpload](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L452-L458>)

Uploads the file

```
fileUpload(doRetry?: boolean = true): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [doRetry](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L452-L452>) (optional) | `boolean` | `true` |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### reset

[Source for reset](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L439-L447>)

Reset the state.

```
reset(emit?: boolean = true): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [emit](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L439-L439>) (optional) | `boolean` | `true` |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### [SiFileDropzoneComponent](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L19-L154>)

**Kind:** component

**Selector:** `si-file-dropzone`

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

```
component SiFileDropzoneComponent
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [accept](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L79-L79>) | `string \| undefined` |  | Define which file types are suggested in file browser.<br><br>See: [https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\#attr-accept](<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept>) |
| [acceptText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L50-L52>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ACCEPTED_FILE_TYPES:Accepted file types: {{accept}}.` `` | Text or translation key for accepted types. |
| [directoryUpload](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L107-L107>) | `boolean` | `false` | Enable directory upload. |
| [errorTextFileMaxSize](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L72-L74>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_SIZE_EXCEEDED:Max. {{maxFileSize}}` `` | Message or translation key if file exceeds the maximum file size limit. |
| [errorTextFileType](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L61-L63>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.ERROR_FILE_TYPE:Invalid file type` `` | Text or translation key of message title if incorrect file type is dragged / dropped. |
| [maxFileSize](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L83-L83>) | `number \| undefined` |  | Define maximal allowed file size in bytes. |
| [maxFileSizeText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L39-L41>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.MAX_SIZE:Upload max. {{maxFileSize}}` `` | Text or translation key for max file size. |
| [multiple](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L90-L90>) | `boolean` | `false` | Defines whether the file input allows selecting multiple files. When [directoryUpload](<index.html#SiFileDropzoneComponent.directoryUpload>) is enabled, this will have no effect. |
| [uploadDropText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L28-L30>) | `TranslatableString` | `` $localize`:@@SI_FILE_UPLOADER.DROP:Drop files here or click to upload` `` | Text or translation key of the drag&drop field. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [fileError](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L100-L100>) | `FileUploadError` | Event emitted when file validation errors occur, including files that were ignored due to size or type. |
| [filesAdded](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L95-L95>) | `UploadFile[]` | Event emitted when valid files are added. Invalid files are also included here, but with status 'invalid' and an errorText describing why they were ignored. |

#### Attributes and Methods

##### reset

[Source for reset](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-dropzone.component.ts#L151-L153>)

Reset all the files inside the native file input (and therefore the dropzone).

```
reset(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [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>

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [FileUploadError](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L18-L21>)

**Kind:** interface

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

```
interface FileUploadError extends UploadFile
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [errorParams](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L15-L15>) (optional, inherited) | `Record<string, unknown>` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [errorText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L20-L20>) | `TranslatableString` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L11-L11>) (inherited) | `File` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [fileName](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L12-L12>) (inherited) | `string` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [progress](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L16-L16>) (inherited) | `number` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [size](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L13-L13>) (inherited) | `string` | Inherited from [UploadFile](<index.html#t:UploadFile>) |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-upload.directive.ts#L19-L19>) | `"invalid"` | Inherited from [UploadFile](<index.html#t:UploadFile>) |

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

**Kind:** interface

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

The FileUploadResult is emitted at completion of the file uploading via the `uploadCompleted` emitter. On success the Http `response` from the backend is provided and on failure, the `error` object is available.

```
interface FileUploadResult
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [error](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L46-L46>) (optional) | `Error` |  |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L44-L44>) | `string` |  |
| [response](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.component.ts#L45-L45>) (optional) | `HttpResponse<unknown>` |  |

### [UploadFile](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L9-L17>)

**Kind:** interface

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

```
interface UploadFile
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [errorParams](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L15-L15>) (optional) | `Record<string, unknown>` |  |
| [errorText](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L14-L14>) (optional) | `TranslatableString` |  |
| [file](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L11-L11>) | `File` |  |
| [fileName](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L12-L12>) | `string` |  |
| [progress](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L16-L16>) | `number` |  |
| [size](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L13-L13>) | `string` |  |
| [status](<https://github.com/siemens/element/blob/main/projects/element-ng/file-uploader/si-file-uploader.model.ts#L10-L10>) | `"error" \| "success" \| "added" \| "invalid" \| "queued" \| "uploading"` |  |
