MCPcopy
hub / github.com/simstudioai/sim / createBlobConfig

Function createBlobConfig

apps/sim/lib/uploads/core/storage-service.ts:31–48  ·  view source on GitHub ↗

* Create a Blob config from StorageConfig * @throws Error if required properties are missing

(config: StorageConfig)

Source from the content-addressed store, hash-verified

29 * @throws Error if required properties are missing
30 */
31function createBlobConfig(config: StorageConfig): BlobConfig {
32 if (!config.containerName || !config.accountName) {
33 throw new Error('Blob configuration missing required properties: containerName and accountName')
34 }
35
36 if (!config.connectionString && !config.accountKey) {
37 throw new Error(
38 'Blob configuration missing authentication: either connectionString or accountKey must be provided'
39 )
40 }
41
42 return {
43 containerName: config.containerName,
44 accountName: config.accountName,
45 accountKey: config.accountKey,
46 connectionString: config.connectionString,
47 }
48}
49
50/**
51 * Create an S3 config from StorageConfig

Callers 7

uploadFileFunction · 0.85
ensureBackendFunction · 0.85
downloadFileFunction · 0.85
downloadFileStreamFunction · 0.85
deleteFileFunction · 0.85
headObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected