> For the complete documentation index, see [llms.txt](https://2600hz.gitbook.io/sds/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2600hz.gitbook.io/sds/sds-components/form-controls/file-upload-input/code.md).

# Code

<table><thead><tr><th>Props</th><th width="380.66666666666663">Data Type</th><th>Required</th></tr></thead><tbody><tr><td>className</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>id</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td>name</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>placeholder</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>label</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>info</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>buttontext</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>helpText</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>error</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>errorMessage</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>readOnly</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>disabled</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>files</td><td>'All' | 'Images' | 'Audio' | 'Video'</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>onChange</td><td>Function</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

{% hint style="info" %}
This component only allows users to select one single file. In the case developers would like the user to select multiple files, it is recommened to use instead the [FileUploadRegion](/sds/sds-components/form-controls/file-upload-region.md) component.
{% endhint %}

### Files

This feature sets filters for the OS finder to show just the selected file types. But this is not a filter to prevent the user from uploading or not different file types. That's a validation developers have to implement by themselves to have a better control of processes.

### Event Response

| Property      | Data Type   |
| ------------- | ----------- |
| id            | string      |
| file          | file object |
| fileExtension | string      |
| fileName      | string      |
| fileURL       | string      |
| name          | string      |
| label         | string      |

### Example

```tsx
<FileUploadInput
  className="FileUploadInputExample"
  errorMessage="Optional error message can offer better guidance."
  files="Images"
  id="textInputId"
  name="textInputName"
  onChange={(e)=>{console.log(e)}}
  placeholder="Placeholder..."
/>
```

## Live Demo

For detailed code usage documentation, see the Storybooks for each framework below.

### React

{% embed url="<https://sipster-react-component-storybook.netlify.app/?path=/story/form-controls-file-upload-input--basic-file-upload-input&args=files:Images>" %}
