Enriches assets with the getAssetFileUrl and getAssetPreviewUrl method.
import { Showpad } from '@showpad/experience-app-sdk'const assets = [{ "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 enrichedAssets = await Showpad.enrichAssets(assets, 400) Copy
import { Showpad } from '@showpad/experience-app-sdk'const assets = [{ "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 enrichedAssets = await Showpad.enrichAssets(assets, 400)
The maximum dimension for the width or height of the preview.
Generated using TypeDoc
Enriches assets with the getAssetFileUrl and getAssetPreviewUrl method.
Example