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

Function commitBlobBlockList

apps/sim/lib/uploads/providers/blob/client.ts:675–686  ·  view source on GitHub ↗
(
  key: string,
  parts: AzureMultipartPart[],
  contentType: string,
  customConfig?: BlobConfig
)

Source from the content-addressed store, hash-verified

673 * server-side streaming uploader (the KB flow uses {@link completeMultipartUpload}).
674 */
675export 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

Callers 1

createBlobBackendFunction · 0.85

Calls 1

getBlockBlobClientForFunction · 0.85

Tested by

no test coverage detected