StorageClient class

The Nhost storage service.

Supports the storage and retrieval of files on the backend.

Constructors

StorageClient({required String baseUrl, required UserSession session, required Client httpClient})

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

close() → void
Releases the object's resources.
delete(String fileId) Future<void>
Deletes a file on the backend.
downloadFile(String fileId) Future<Response>
Downloads the file with the specified identifier.
downloadImage(String fileId, {ImageTransform? transform}) Future<Response>
Downloads the image with the specified identifier, optionally applying a visual transformation.
getPresignedUrl(String fileId) Future<PresignedUrl>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
uploadBytes({required String fileName, required List<int> fileContents, String? fileId, String? bucketId, String mimeType = applicationOctetStreamType, UploadProgressCallback? onUploadProgress}) Future<FileMetadata>
Uploads a file to the backend from a list of bytes.
uploadString({required String fileName, required String fileContents, String? fileId, String? bucketId, String mimeType = applicationOctetStreamType, UploadProgressCallback? onUploadProgress}) Future<FileMetadata>
Uploads a file to the backend from a string.

Operators

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