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

Function reportProgress

apps/sim/lib/uploads/client/direct-upload.ts:424–431  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

422
423 const completedBytes = new Array<number>(numParts).fill(0)
424 const reportProgress = () => {
425 const loaded = completedBytes.reduce((a, b) => a + b, 0)
426 onProgress?.({
427 loaded,
428 total: file.size,
429 percent: Math.min(100, Math.round((loaded / file.size) * 100)),
430 })
431 }
432
433 const uploadedParts: CompletedPart[] = []
434

Callers 1

uploadPartFunction · 0.85

Calls 1

onProgressFunction · 0.85

Tested by

no test coverage detected