mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
3.3 KiB
3.3 KiB
Thumbnail service
Retrieves an SVG thumbnail image to represent a document type.
Methods
public getDocumentThumbnailUrl(document: any): string
Gets a thumbnail URL for a document node.
public getMimeTypeIcon(mimeType: string): string
Gets a thumbnail URL for a MIME type.
public getDefaultMimeTypeIcon(): string
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
Details
The service can locate a thumbnail icon (in SVG format) for either a document node or a MIME type. The default mapping between types and icons is shown in the table below:
Mat-icon
All the MIME types ADF icon are now registered into the MatIconRegistry, this will allow you to use all the icon through the mat-icon tag:
import { ThumbnailService } from '@alfresco/adf-core';
constructor(public thumbnailService: ThumbnailService) {
}
MP4 <mat-icon svgIcon="video/mp4"></mat-icon>
PDF <mat-icon svgIcon="application/pdf"></mat-icon>
GIF <mat-icon svgIcon="image/gif"></mat-icon>
.....