Thumbnails (IRPCThumbnails)
Gets thumbnail images of document files and the vault's thumbnail settings.
Provides methods for getting thumbnail-spefific information and operations.
| gRPC service | MFiles.IRPCThumbnails |
|---|---|
| Book and level | Vault API, standard |
| Methods | 2 |
| Proto file | mfiles/IRPCThumbnails.proto |
Overview
Use GetDocumentFileThumbnail to show a small picture of a file in a listing or a larger preview of its first page. All images are PNG.
- Classic thumbnails (
THUMBNAIL_TYPE_CLASSIC) are square images that the server generates once per file version with the file type handlers installed on the server, and then caches. Whether one exists is reported inthumbnail_status; not every file type has one. - Preview thumbnails (
THUMBNAIL_TYPE_PREVIEW) show the first page of the file in its own aspect ratio, scaled to fit the size you ask for. When no preview can be made, the server returns the file type's icon instead. - GetThumbnailOptions tells whether thumbnails are enabled in the vault and which file types are excluded. M-Files desktop clients use it to decide whether to create classic thumbnails themselves.
Both methods need a vault session and no special vault rights. To identify a file, take the
file_ver of a File from the object version, for example from
GetObjectFiles or from the files of a
search result.
Methods
| Method | Summary | Facts |
|---|---|---|
| GetDocumentFileThumbnail | Gets a classic thumbnail or a first-page preview of one file of an object version, as PNG. | read session idempotent returns metadata structure version |
| GetThumbnailOptions | Gets the vault's thumbnail settings. | read session idempotent returns metadata structure version |