LogoRobo.js
Packages@robojs/mock

createStorage()

Function: createStorage()

function createStorage(config): AttachmentStorage

Factory function to create a storage backend from configuration.

Parameters

ParameterTypeDescription
configStorageConfigStorage configuration

Returns

AttachmentStorage

A storage backend instance

Example

// Create in-memory storage (default)
const storage = createStorage({ type: 'memory' })

// Future: Create S3 storage
const storage = createStorage({
  type: 's3',
  options: { bucket: 'my-bucket', region: 'us-east-1' }
})

On this page