StorageCategory class
The Amplify Storage category provides an interface for interacting with a storage plugin.
It comes with default, built-in support for Amazon S3 service leveraging Amplify Auth Category for authorization.
The Amplify CLI helps you to create and configure the storage category and auth category.
- Inheritance
-
- Object
- AmplifyCategory<
StoragePluginInterface> - StorageCategory
Constructors
Properties
- category → Category
-
no setteroverride
-
categoryDependencies
→ Set<
Category> -
The categories this category depends on.
no setteroverride
- defaultPlugin → StoragePluginInterface
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
plugins
→ List<
StoragePluginInterface> -
The plugins registered for this category.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addPlugin(
StoragePluginInterface plugin, {required AmplifyAuthProviderRepository authProviderRepo}) → Future< void> -
Adds a plugin to the category.
inherited
-
copy(
{required StorageItemWithAccessLevel< StorageItem> source, required StorageItemWithAccessLevel<StorageItem> destination, StorageCopyOptions? options}) → StorageCopyOperation<StorageCopyRequest< StorageItem> , StorageCopyResult<StorageItem> > -
Makes a copy of the
source
todestination
with optional StorageCopyOptions, and returns a StorageCopyOperation. -
downloadData(
{required String key, void onProgress(StorageTransferProgress)?, StorageDownloadDataOptions? options}) → StorageDownloadDataOperation< StorageDownloadDataRequest, StorageDownloadDataResult< StorageItem> > -
Downloads bytes of object specified by
key
into memory with optionalonProgress
and StorageDownloadDataOptions, and returns a StorageDownloadDataOperation. -
downloadFile(
{required String key, required AWSFile localFile, void onProgress(StorageTransferProgress)?, StorageDownloadFileOptions? options}) → StorageDownloadFileOperation< StorageDownloadFileRequest, StorageDownloadFileResult< StorageItem> > -
Downloads the object specified by
key
tolocalFile
with optionalonProgress
and StorageDownloadFileOptions, and returns a StorageDownloadFileOperation. -
getPlugin<
P extends StoragePluginInterface> (StoragePluginKey< P> pluginKey) → P -
getProperties(
{required String key, StorageGetPropertiesOptions? options}) → StorageGetPropertiesOperation< StorageGetPropertiesRequest, StorageGetPropertiesResult< StorageItem> > -
Retrieves properties of the object specified by
key
with optional StorageGetPropertiesOptions. And returns a StorageGetPropertiesOperation. -
getUrl(
{required String key, StorageGetUrlOptions? options}) → StorageGetUrlOperation< StorageGetUrlRequest, StorageGetUrlResult> -
Generates a downloadable url for the object specified by
key
with StorageGetUrlOptions, and returns a StorageGetUrlOperation. -
list(
{String? path, StorageListOptions? options}) → StorageListOperation< StorageListRequest, StorageListResult< StorageItem> > -
Lists objects under the
path
with optional StorageListOptions and returns a StorageListOperation. -
move(
{required StorageItemWithAccessLevel< StorageItem> source, required StorageItemWithAccessLevel<StorageItem> destination, StorageMoveOptions? options}) → StorageMoveOperation<StorageMoveRequest< StorageItem> , StorageMoveResult<StorageItem> > -
Moves
source
todestination
with optional StorageMoveOptions, and returns a StorageMoveOperation. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
{required String key, StorageRemoveOptions? options}) → StorageRemoveOperation< StorageRemoveRequest, StorageRemoveResult< StorageItem> > -
Removes an object specified by
key
with optional StorageRemoveOptions, and returns a StorageRemoveOperation. -
removeMany(
{required List< String> keys, StorageRemoveManyOptions? options}) → StorageRemoveManyOperation<StorageRemoveManyRequest, StorageRemoveManyResult< StorageItem> > -
Removes multiple objects specified by
keys
with optional StorageRemoveManyOptions, and returns a StorageRemoveManyOperation. -
reset(
) → Future< void> -
Resets the category, clearing all registered plugins.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadData(
{required StorageDataPayload data, required String key, void onProgress(StorageTransferProgress)?, StorageUploadDataOptions? options}) → StorageUploadDataOperation< StorageUploadDataRequest, StorageUploadDataResult< StorageItem> > -
Uploads
data
as a StorageDataPayload with optionalonProgress
and StorageUploadDataOptions to object specified bykey
, and returns a StorageUploadDataOperation. -
uploadFile(
{required AWSFile localFile, required String key, void onProgress(StorageTransferProgress)?, StorageUploadFileOptions? options}) → StorageUploadFileOperation< StorageUploadFileRequest, StorageUploadFileResult< StorageItem> > -
Uploads data from
localFile
with optionalonProgress
and StorageUploadFileOptions to object specified bykey
, and returns a StorageUploadFileOperation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited