[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / FileUpload

# Function: FileUpload()

> **FileUpload**(`props`): [`HtmlNode`](../type-aliases/HtmlNode)

Defined in: [flow/src/components.ts:1041](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/components.ts#L1041)

A dropzone bound to an `@expose` property. Selecting a file POSTs it to
`/__flow/upload` over HTTP, shows live progress, and `$set`s a signed reference the
server resolves into a `TemporaryUploadedFile`. Pairs with the `FileUploads` mixin.

## Parameters

### props

[`FileUploadProps`](../interfaces/FileUploadProps)

## Returns

[`HtmlNode`](../type-aliases/HtmlNode)

## Remarks

Bind `bind` to the receiving property; `multiple` uploads an array, `accept` filters
the file picker, and `children` render below the dropzone (e.g. a preview of the
current value).

## Example

```tsx
<FileUpload bind={this.photo} accept="image/*" />
<FileUpload bind={this.docs} multiple />
```
