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

Function calculateUploadTimeoutMs

apps/sim/lib/uploads/client/direct-upload.ts:79–83  ·  view source on GitHub ↗
(fileSize: number)

Source from the content-addressed store, hash-verified

77}
78
79export const calculateUploadTimeoutMs = (fileSize: number): number => {
80 const sizeInMb = fileSize / (1024 * 1024)
81 const dynamicBudget = BASE_TIMEOUT_MS + sizeInMb * TIMEOUT_PER_MB_MS
82 return Math.min(dynamicBudget, MAX_TIMEOUT_MS)
83}
84
85/**
86 * Run `worker` over `items` with at most `limit` concurrent invocations.

Callers 2

uploadFileThroughAPIFunction · 0.90
uploadViaPresignedPutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected