File

core/common/generic-file-icon.pipe.ts

Description

Returns a generic file icon name matching the extension of the given File object. One of the following icon names may be returned: file-archive-o, file-audio-o, document-with-code, file, file-excel-o, file-image-o, pdf-2, file-powerpoint-o, file-text, file-video-o, file-word-o, file, or unknown.

Example :
<div *ngFor="let file of droppedFiles">
    <i class="icon" [c8yIcon]="file | fileIcon"></i>
</div>

Metadata

Methods

getGenericType
getGenericType(file: File)
Parameters :
Name Type Optional
file File No
getIcon
getIcon(genericType: GENERIC_FILE_TYPE | "unknown")
Parameters :
Name Type Optional
genericType GENERIC_FILE_TYPE | "unknown" No
Returns : string
transform
transform(file: File)
Parameters :
Name Type Optional
file File No
Returns : string

Properties

Public filesService
Type : FilesService

results matching ""

    No results matching ""