(fileSize: number)
| 77 | } |
| 78 | |
| 79 | export 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. |
no outgoing calls
no test coverage detected