MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / assetContentType

Function assetContentType

packages/cli/src/utils/compositionServer.ts:77–82  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

75};
76
77export function assetContentType(filePath: string): string {
78 const ext = filePath.split(".").pop() ?? "";
79 // Own-property check so an ext like "__proto__" can't resolve to Object.prototype.
80 const type = Object.hasOwn(ASSET_CONTENT_TYPES, ext) ? ASSET_CONTENT_TYPES[ext] : undefined;
81 return type ?? "application/octet-stream";
82}
83
84/**
85 * Bind `server` to the first free port at or after `startPort` (scanning up to

Callers 2

runFunction · 0.85
runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected