• Example

    import { Showpad } from '@showpad/experience-app-sdk'

    const asset = {
    "id": "a3e72bbfae0b87381106b1beb685ea88",
    "slug": "648b2eb8-6fa1-40f2-b787-39cb1d51db69",
    "applink": "showpad://file/648b2eb8-6fa1-40f2-b787-39cb1d51db69",
    "name": "sample.pdf",
    "displayName": "sample",
    "type": "document",
    "description": "",
    "permissions": {
    "share": true,
    "download": true,
    "annotate": true
    },
    "tagIds": [
    "5debee5405cfd4e2797b553037ceb78c"
    ],
    "createdAt": "1970-01-19T21:15:07.909Z",
    "updatedAt": "1970-01-19T23:24:34.801Z",
    "expiresAt": null
    }

    const thumbnailUrl = await Showpad.getAssetThumbnailUrl(asset.id, asset.slug, 400)

    Parameters

    • assetId: string
    • assetSlug: string
    • size: number

      The maximum dimension for the width or height.

    Returns Promise<string>

    A URL to download the file thumbnail. This URL can be used within the Showpad apps without authentication. If called outside of the Showpad context, authentication will need to be added manually (eg. by calling getShowpadApi).

Generated using TypeDoc