MCPcopy Index your code
hub / github.com/simstudioai/sim / getViewerUrl

Function getViewerUrl

apps/sim/lib/uploads/utils/file-utils.ts:924–932  ·  view source on GitHub ↗
(fileKey: string, workspaceId?: string)

Source from the content-addressed store, hash-verified

922 * @returns Viewer URL string or null if workspaceId cannot be determined
923 */
924export function getViewerUrl(fileKey: string, workspaceId?: string): string | null {
925 const resolvedWorkspaceId = workspaceId || extractWorkspaceIdFromExecutionKey(fileKey)
926
927 if (!resolvedWorkspaceId) {
928 return null
929 }
930
931 return `/workspace/${resolvedWorkspaceId}/files/${fileKey}`
932}

Callers 2

handleDownloadFunction · 0.90
handleCloudFileFunction · 0.90

Calls 1

Tested by

no test coverage detected