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

Function createBlobBackend

apps/sim/lib/uploads/core/storage-service.ts:238–254  ·  view source on GitHub ↗
(
  key: string,
  config: BlobConfig,
  contentType: string
)

Source from the content-addressed store, hash-verified

236}
237
238async function createBlobBackend(
239 key: string,
240 config: BlobConfig,
241 contentType: string
242): Promise<MultipartBackend> {
243 const { stageBlobPart, commitBlobBlockList, abortMultipartUpload } = await import(
244 '@/lib/uploads/providers/blob/client'
245 )
246 const parts: AzureMultipartPart[] = []
247 return {
248 async uploadPart(partNumber, body) {
249 parts.push(await stageBlobPart(key, partNumber, body, config))
250 },
251 finish: () => commitBlobBlockList(key, parts, contentType, config),
252 abort: () => abortMultipartUpload(key, config),
253 }
254}
255
256/**
257 * Open a streaming multipart upload to the configured provider. On the local

Callers 1

ensureBackendFunction · 0.85

Calls 2

commitBlobBlockListFunction · 0.85
abortMultipartUploadFunction · 0.85

Tested by

no test coverage detected