(controller)
| 31 | let loaded = 0; |
| 32 | return new ReadableStream({ |
| 33 | pull(controller) { |
| 34 | while (index < parts.length && offset >= parts[index].length) { |
| 35 | index++; |
| 36 | offset = 0; |
| 37 | } |
| 38 | if (index >= parts.length) { |
| 39 | controller.close(); |
| 40 | return; |
| 41 | } |
| 42 | const part = parts[index]; |
| 43 | const end = Math.min(offset + UPLOAD_CHUNK_SIZE, part.length); |
| 44 | controller.enqueue(part.subarray(offset, end)); |
| 45 | loaded += end - offset; |
| 46 | offset = end; |
| 47 | uploadProgress = { loaded, total }; |
| 48 | } |
| 49 | }); |
| 50 | } |
| 51 |
nothing calls this directly
no outgoing calls
no test coverage detected