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})

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
replaceFile({required String fileId, required FileData file, UploadFileMetadata? metadata, UploadProgressCallback? onUploadProgress}) Future<FileMetadata>
Replaces an existing file on the backend.
toString() String
A string representation of this object.
inherited
uploadBytes({required String fileName, required List<int> fileContents, String? fileId, String? bucketId, String mimeType = applicationOctetStreamType, Map<String, dynamic>? metadata, UploadProgressCallback? onUploadProgress}) Future<FileMetadata>
Uploads a file to the backend from a list of bytes.
uploadFiles({required List<FileData> files, String? bucketId, List<UploadFileMetadata>? metadataList, UploadProgressCallback? onUploadProgress}) Future<List<FileMetadata>>
Uploads files to the backend matching the TypeScript API.
uploadString({required String fileName, required String fileContents, String? fileId, String? bucketId, String mimeType = applicationOctetStreamType, Map<String, dynamic>? metadata, UploadProgressCallback? onUploadProgress}) Future<FileMetadata>
Uploads a file to the backend from a string.

Operators

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