MCPcopy Create free account
hub / github.com/simstudioai/sim / Image

Function Image

apps/sim/app/f/[token]/opengraph-image.tsx:17–37  ·  view source on GitHub ↗
({ params }: { params: Promise<{ token: string }> })

Source from the content-addressed store, hash-verified

15 * so the filename never leaks pre-auth.
16 */
17export default async function Image({ params }: { params: Promise<{ token: string }> }) {
18 const { token } = await params
19 const resolved = await resolveActiveShareByToken(token)
20
21 if (!resolved || resolved.share.authType !== 'public') {
22 return createLandingOgImage({
23 eyebrow: 'Shared file',
24 title: 'Protected file',
25 subtitle: 'Authentication is required to view this file',
26 })
27 }
28
29 const { file, workspaceName, ownerName } = resolved
30 const subtitle = buildProvenance(workspaceName, ownerName) || 'Shared via Sim'
31
32 return createLandingOgImage({
33 eyebrow: 'Shared file',
34 title: file.originalName,
35 subtitle,
36 })
37}

Callers

nothing calls this directly

Calls 3

createLandingOgImageFunction · 0.90
buildProvenanceFunction · 0.90

Tested by

no test coverage detected