StorageFileApi class

Constructors

StorageFileApi(String url, Map<String, String> headers, String? bucketId, int _retryAttempts, Fetch _storageFetch)

Properties

bucketId String?
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The headers used for requests.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
final

Methods

copy(String fromPath, String toPath, {String? destinationBucket}) Future<String>
Copies an existing file.
createSignedUploadUrl(String path, {bool upsert = false}) Future<SignedUploadURLResponse>
Creates a signed upload URL.
createSignedUrl(String path, int expiresIn, {TransformOptions? transform, DownloadBehavior? download, String? cacheNonce}) Future<String>
Create signed URL to download file without requiring permissions. This URL can be valid for a set number of seconds.
createSignedUrls(List<String> paths, int expiresIn, {DownloadBehavior? download, String? cacheNonce}) Future<List<SignedUrl>>
Create signed URLs to download files without requiring permissions.
createSignedUrlsResult(List<String> paths, int expiresIn, {DownloadBehavior? download, String? cacheNonce}) Future<List<SignedUrlResult>>
Create signed URLs to download files without requiring permissions. These URLs can be valid for a set number of seconds.
download(String path, {TransformOptions? transform, Map<String, String>? queryParams, String? cacheNonce}) Future<Uint8List>
Downloads a file.
downloadStream(String path, {TransformOptions? transform, Map<String, String>? queryParams, String? cacheNonce}) Stream<Uint8List>
Downloads a file as a byte stream for memory-efficient handling of large files.
exists(String path) Future<bool>
Checks the existence of a file
getPublicUrl(String path, {TransformOptions? transform, DownloadBehavior? download, String? cacheNonce}) String
Retrieve URLs for assets in public buckets
info(String path) Future<FileObjectV2>
Retrieves the details of an existing file
list({String? path, SearchOptions searchOptions = const SearchOptions()}) Future<List<FileObject>>
Lists all the files within a bucket.
listPaginated({PaginatedSearchOptions options = const PaginatedSearchOptions()}) Future<PaginatedListResult>
Lists files and folders within a bucket with cursor-based pagination and hierarchical (delimiter) listing.
move(String fromPath, String toPath, {String? destinationBucket}) Future<String>
Moves an existing file.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purgeCache(String path, {bool transformations = false}) Future<String>
Purges the CDN cache for a single object.
remove(List<String> paths) Future<List<FileObject>>
Deletes files within the same bucket
setHeader(String key, String value) StorageFileApi
Sets an HTTP header for subsequent requests.
toString() String
A string representation of this object.
inherited
update(String path, File file, {FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController}) Future<String>
Replaces an existing file at the specified path with a new one.
updateBinary(String path, Uint8List data, {FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController}) Future<String>
Replaces an existing file at the specified path with a new one. Can be used on the web.
upload(String path, File file, {FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController}) Future<String>
Uploads a file to an existing bucket.
uploadBinary(String path, Uint8List data, {FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController}) Future<String>
Uploads a binary file to an existing bucket. Can be used on the web.
uploadBinaryToSignedUrl(String path, String token, Uint8List data, [FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController]) Future<String>
Upload a binary file with a token generated from createUploadSignedUrl.
uploadToSignedUrl(String path, String token, File file, [FileOptions fileOptions = const FileOptions(), int? retryAttempts, StorageRetryController? retryController]) Future<String>
Upload a file with a token generated from createUploadSignedUrl.

Operators

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