( key: string, parts: AzureMultipartPart[], contentType: string, customConfig?: BlobConfig )
| 673 | * server-side streaming uploader (the KB flow uses {@link completeMultipartUpload}). |
| 674 | */ |
| 675 | export async function commitBlobBlockList( |
| 676 | key: string, |
| 677 | parts: AzureMultipartPart[], |
| 678 | contentType: string, |
| 679 | customConfig?: BlobConfig |
| 680 | ): Promise<void> { |
| 681 | const blockBlobClient = await getBlockBlobClientFor(key, customConfig) |
| 682 | const sortedBlockIds = parts.sort((a, b) => a.partNumber - b.partNumber).map((p) => p.blockId) |
| 683 | await blockBlobClient.commitBlockList(sortedBlockIds, { |
| 684 | blobHTTPHeaders: { blobContentType: contentType }, |
| 685 | }) |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Complete multipart upload by committing all blocks |
no test coverage detected