File

packages/eui/packages/components/eui-file-upload/file-preview/file-preview.component.ts

Description

Internal class used by eui-file-upload to display the files to be uploaded.

Implements

OnInit AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs

Inputs

file
Type : Blob | EuiUploadedFileInterface | any

The file to use. Will be a Blob for a file to be uploaded, EuiUploadedFileInterface for an initial file.

hasPreview
Type : boolean
Default value : true

Whether a preview, image or icon, is displayed for a file to upload.

hasPreviewAsIcon
Type : boolean
Default value : false

Whether a preview is displayed as a file format icon.

hasPreviewAsImage
Type : boolean
Default value : true

Whether a preview is displayed as image.

index
Type : number

Index of the file in the list.

isFilenameDisplayed
Type : boolean
Default value : true

Whether the filename is displayed.

isFileObject
Type : boolean
Default value : false

Whether the file is File or has been provided by the user as initial value.

isFilesizeDisplayed
Type : boolean
Default value : true

Whether the filesize is displayed.

isFiletypeDisplayed
Type : boolean
Default value : true

Whether the file type is displayed.

isItemsClickable
Type : boolean
Default value : false

Whether items can be clicked. itemClick event is emitted.

previewAsIconConfig
Type : { avi: string; html: string; htm: string; js: string; json: string; mp3: string; mp4: string; pdf: string; png: string; svg: string; txt: string; xml: string; jpeg: string; jpg: string; zip: string; doc: string; ... 5 more ...; rtf: string; }
Default value : { avi: 'eui-file-video', html: 'eui-file-html', htm: 'eui-file-code', js: 'eui-file-code', json: 'eui-file-code', mp3: 'eui-file-audio', mp4: 'eui-file-video', pdf: 'eui-file-pdf', png: 'eui-file-image', svg: 'eui-file-image', txt: 'eui-file-text', xml: 'eui-file-code', jpeg: 'eui-file-image', jpg: 'eui-file-image', zip: 'eui-file-archive', doc: 'eui-file-word', docx: 'eui-file-word-o', xls: 'eui-file-excel-o', xlsx: 'eui-file-excel-o', ppt: 'eui-file-powerpoint', csv: 'eui-file-text', rtf: 'eui-file-text', }

Object matching extension and icon.

uploadedFileTemplate
Type : TemplateRef<literal type>

Template to use in the list of files.

Outputs

itemClick
Type : EventEmitter

Event emitted when a chosen file to upload is clicked.

removeFromList
Type : EventEmitter

Event emitted when the remove button is clicked.

Methods

Public onItemClick
onItemClick(e: Event)

Click item handler.

Parameters :
Name Type Optional Description
e Event No

The item clicked.

Returns : void
Public onRemoveFromList
onRemoveFromList()

Remove from the list handler.

Returns : void

Properties

Public fileExtension
Type : string
Public icon
Type : string
Public isLoading
Default value : false
Public previewData
Type : literal type
templates
Type : QueryList<EuiTemplateDirective>
Decorators :
@ContentChildren(EuiTemplateDirective)
Public url
Type : string

results matching ""

    No results matching ""