MCPcopy
hub / github.com/simstudioai/sim / assertKnownSizeWithinLimit

Function assertKnownSizeWithinLimit

apps/sim/lib/core/utils/stream-limits.ts:33–37  ·  view source on GitHub ↗
(size: number, maxBytes: number, label: string)

Source from the content-addressed store, hash-verified

31}
32
33export function assertKnownSizeWithinLimit(size: number, maxBytes: number, label: string): void {
34 if (Number.isFinite(size) && size > maxBytes) {
35 throw new PayloadSizeLimitError({ label, maxBytes, observedBytes: size })
36 }
37}
38
39function getContentLength(
40 headers: { get(name: string): string | null } | undefined

Callers 15

downloadFalMediaFunction · 0.90
downloadFileFromStorageFunction · 0.90
downloadFromBlobFunction · 0.90
downloadFromS3Function · 0.90
downloadFileFunction · 0.90
bufferFromImageUrlFunction · 0.90
generateWithOpenAIFunction · 0.90
generateWithGeminiFunction · 0.90
synthesizeWithGoogleFunction · 0.90
handleSendEnvelopeFunction · 0.90
generateWithRunwayFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected