()
| 282 | const drainPending = (): Buffer<ArrayBuffer> => Buffer.concat(pendingChunks, pendingBytes) |
| 283 | |
| 284 | const ensureBackend = async (): Promise<MultipartBackend> => { |
| 285 | if (!backend) { |
| 286 | backend = USE_BLOB_STORAGE |
| 287 | ? await createBlobBackend(key, createBlobConfig(config), contentType) |
| 288 | : await createS3Backend(key, createS3Config(config), contentType, context) |
| 289 | } |
| 290 | return backend |
| 291 | } |
| 292 | |
| 293 | const dispatchPart = async (body: Buffer): Promise<void> => { |
| 294 | // Bound concurrency: wait for a free slot before starting another part. |
no test coverage detected