FusabaseStorage constructor
- {required FusabaseApp app,
- String? bucket,
- Duration? maxDownloadRetryTime,
- Duration? maxOperationRetryTime,
- Duration? maxUploadRetryTime}
Constructs a new FusabaseStorage instance.
Parameters:
- app: The associated FUSABASE app (required).
bucket: Optional bucket name; defaults to app's storageBucket.maxDownloadRetryTime: Maximum retry time for downloads.maxOperationRetryTime: Maximum retry time for operations.maxUploadRetryTime: Maximum retry time for uploads.
Returns: A new FusabaseStorage instance.
Example:
var storage = FusabaseStorage(app: myApp, bucket: 'my-bucket');
Implementation
FusabaseStorage({
required this.app,
String? bucket,
Duration? maxDownloadRetryTime,
Duration? maxOperationRetryTime,
Duration? maxUploadRetryTime,
}) : bucket = app.options.storageBucket,
_maxDownloadRetryTime = maxDownloadRetryTime?.inMilliseconds ?? 10000,
_maxOperationRetryTime = maxOperationRetryTime?.inMilliseconds ?? 10000,
_maxUploadRetryTime = maxUploadRetryTime?.inMilliseconds ?? 10000,
_options = app.options,
__logLevel = app.logLevel,
_config = FusabaseStorageConfig(
host: app.options.ordsHost,
schema: app.options.schema,
projectID: app.options.projectID,
module: app.options.objsType,
appID: app.options.appID,
);