### File

`packages/eui/packages/components-next/src/lib/components/eui-file-upload/eui-file-upload.component.ts`

### Implements

`ControlValueAccessor` `OnInit`

### Metadata

encapsulation | `ViewEncapsulation.None`
providers | `{ provide: NG_VALUE_ACCESSOR, useExisting: EuiFileUploadComponent, multi: true, }`
selector | `eui-file-upload`
styleUrls | `./styles/_index.scss`
templateUrl | `./eui-file-upload.component.html`

### Index

###### Properties

- _hasDragArea
- dropAreaClass
- Public files
- Public filesTotalSize
- Public randomNumberId
- Public uploadedFiles
- viewChildren

###### Methods

- Public getTotalSize
- onDragEnter
- onDragLeave
- registerOnChange
- registerOnTouched
- Public removeFromList
- Public removeFromUploadedList
- Public resetList
- writeValue

###### Inputs

- accept
- hasDragArea
- hasPreview
- hasPreviewAsIcon
- hasPreviewAsImage
- hasProgressBar
- hasResetButton
- hasTotalSizeDisplayed
- isMultiple
- progress

###### Outputs

- drop

###### HostListeners

- change

###### Accessors

- hasDragArea
- showResetBtn

### Inputs

accept
Default value : `'*'`

hasDragArea

hasPreview
Default value : `true`

hasPreviewAsIcon
Default value : `false`

hasPreviewAsImage
Default value : `true`

hasProgressBar
Default value : `true`

hasResetButton
Default value : `true`

hasTotalSizeDisplayed
Default value : `true`

isMultiple
Default value : `true`

progress
Type : `number`

### Outputs

drop
Type : `EventEmitter`

### HostListeners

change
Arguments : `'$event.target.files'`
`change(fileList: FileList)`

### Methods

Public getTotalSize
`getTotalSize()`
Returns : `void`

onDragEnter
`onDragEnter()`
Returns : `void`

onDragLeave
`onDragLeave()`
Returns : `void`

registerOnChange
`registerOnChange(fn: any)`

Parameters :

Name | Type | Optional
fn | `any` | No

Returns : `void`

registerOnTouched
`registerOnTouched(fn: any)`

Parameters :

Name | Type | Optional
fn | `any` | No

Returns : `void`

Public removeFromList
`removeFromList(index: number)`

Parameters :

Name | Type | Optional
index | `number` | No

Returns : `void`

Public removeFromUploadedList
`removeFromUploadedList(index: number)`

Parameters :

Name | Type | Optional
index | `number` | No

Returns : `void`

Public resetList
`resetList(event?: any)`

Parameters :

Name | Type | Optional
event | `any` | Yes

Returns : `void`

writeValue
`writeValue(value: any)`

Parameters :

Name | Type | Optional
value | `any` | No

Returns : `void`

### Properties

_hasDragArea
Default value : `false`

dropAreaClass
Type : `string`
Default value : `'file-drop-area'`

Public files
Type : `File[]`
Default value : `[]`

Public filesTotalSize
Type : `number`
Default value : `0`

Public randomNumberId
Default value : `Math.floor(Math.random() * 10000)`

Public uploadedFiles
Type : `EuiUploadedFile[]`
Default value : `[]`

viewChildren
Type : `QueryList<ElementRef<HTMLInputElement>>`
Decorators : `@ViewChildren('input')`

### Accessors

hasDragArea
set `hasDragArea(value)`

Parameters :

Name | Optional
value | No

Returns : `void`

showResetBtn
get `showResetBtn()`

# result-matching ""

# No results matching ""