StorageAccess class

Collects methods for accessing cloud storage.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createDirectFileUploadDescription({required String storageId, required String path}) Future<String?>
Creates a new file upload description, that can be passed to the client's FileUploader. After the file has been uploaded, the verifyDirectFileUpload method should be called, or the file may be deleted.
deleteFile({required String storageId, required String path}) Future<void>
Deletes a file from cloud storage.
fileExists({required String storageId, required String path}) Future<bool>
Checks if a file exists in cloud storage.
getPublicUrl({required String storageId, required String path}) Future<Uri?>
Gets the public URL for a file, if the storageId is a public storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retrieveFile({required String storageId, required String path}) Future<ByteData?>
Retrieve a file from cloud storage.
storeFile({required String storageId, required String path, required ByteData byteData, DateTime? expiration}) Future<void>
Store a file in the cloud storage. storageId is typically 'public' or 'private'. The public storage can be accessed through a public URL. The file is stored at the path relative to the cloud storage root directory, if a file already exists it will be replaced.
toString() String
A string representation of this object.
inherited
verifyDirectFileUpload({required String storageId, required String path}) Future<bool>
Call this method after a file has been uploaded. It will return true if the file was successfully uploaded.

Operators

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