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

Function stageBlobPart

apps/sim/lib/uploads/providers/blob/client.ts:659–669  ·  view source on GitHub ↗
(
  key: string,
  partNumber: number,
  body: Buffer,
  customConfig?: BlobConfig
)

Source from the content-addressed store, hash-verified

657 * presigned {@link getMultipartPartUrls}.
658 */
659export async function stageBlobPart(
660 key: string,
661 partNumber: number,
662 body: Buffer,
663 customConfig?: BlobConfig
664): Promise<AzureMultipartPart> {
665 const blockBlobClient = await getBlockBlobClientFor(key, customConfig)
666 const blockId = deriveBlobBlockId(partNumber)
667 await blockBlobClient.stageBlock(blockId, body, body.length)
668 return { partNumber, blockId }
669}
670
671/**
672 * Commit staged blocks into the final blob, setting the content type. Used by the

Callers 1

uploadPartFunction · 0.85

Calls 2

getBlockBlobClientForFunction · 0.85
deriveBlobBlockIdFunction · 0.85

Tested by

no test coverage detected