StorageConfig class

Storage disks for Storage().

Each disk is a map of options with a driver key, so the config can be sent to every isolate. Drivers: local, s3 and memory.

StorageConfig(
  defaultDisk: 'local',
  disks: {
    'local': {'driver': 'local', 'root': 'storage', 'url': 'http://localhost:3000/files'},
    's3': {'driver': 's3', 'bucket': 'my-bucket', 'region': 'us-east-1',
           'key': '...', 'secret': '...'},
    'memory': {'driver': 'memory'},
  },
);

Constructors

StorageConfig({String defaultDisk = 'local', Map<String, Map<String, dynamic>> disks = const <String, Map<String, dynamic>>{'local' : <String, dynamic>{'driver' : 'local', 'root' : 'storage'}}})
const

Properties

defaultDisk → String
Disk used by Storage() when no disk is given.
final
disks → Map<String, Map<String, dynamic>>
Disk name to options.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited