NhostStorageClient class

The Nhost storage service.

Supports the storage and retrieval of files on the backend.

Constructors

NhostStorageClient({required String url, UserSession? session, Client? httpClient})
subdomain is the Nhost "subdomain" and "region" that can be found on your Nhost project page. for local development pass 'local' to subdomain and leave region empty string '';

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, {ImageTransformBase? transform}) Future<Response>
Downloads the image with the specified identifier, optionally applying a visual transformation.
getPresignedUrl(String fileId, {ImageTransformBase? transform}) 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