### Get Object as Stream - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Retrieves an object from a specified bucket and object name as a stream. The stream provides access to content length and can be piped to a file or processed otherwise. ```Dart import 'dart:io'; import 'package:minio/minio.dart'; void main() async { final minio = Minio( endPoint: 's3.amazonaws.com', accessKey: 'YOUR-ACCESSKEYID', secretKey: 'YOUR-SECRETACCESSKEY', ); final stream = await minio.getObject('BUCKET-NAME', 'OBJECT-NAME'); // Get object length print(stream.contentLength); // Write object data stream to file await stream.pipe(File('output.txt').openWrite()); } ``` -------------------------------- ### Initialize MinIO Client - Filebase - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Initializes the MinIO client for connecting to Filebase. Requires the Filebase endpoint, access key ID, secret access key, and setting useSSL to true. ```Dart final minio = Minio( endPoint: 's3.filebase.com', accessKey: 'YOUR-ACCESSKEYID', secretKey: 'YOUR-SECRETACCESSKEY', useSSL: true, ); ``` -------------------------------- ### Initialize MinIO Client - MinIO - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Initializes the MinIO client for connecting to a MinIO server. Requires the endpoint, access key, and secret key. ```Dart final minio = Minio( endPoint: 'play.min.io', accessKey: 'Q3AM3UQ867SPQQA43P2F', secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', ); ``` -------------------------------- ### Upload File from Path - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Uploads a file from a local path to a specified bucket and object name. Requires importing 'package:minio/io.dart' for file system operations. ```Dart import 'package:minio/io.dart'; import 'package:minio/minio.dart'; void main() async { final minio = Minio( endPoint: 'play.min.io', accessKey: 'Q3AM3UQ867SPQQA43P2F', secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', ); await minio.fPutObject('mybucket', 'myobject', 'path/to/file'); } ``` -------------------------------- ### Initialize MinIO Client - AWS S3 - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Initializes the MinIO client for connecting to AWS S3. Requires the AWS S3 endpoint, access key ID, and secret access key. ```Dart final minio = Minio( endPoint: 's3.amazonaws.com', accessKey: 'YOUR-ACCESSKEYID', secretKey: 'YOUR-SECRETACCESSKEY', ); ``` -------------------------------- ### Upload Object with Progress - Dart Source: https://github.com/xtyxtyx/minio-dart/blob/master/README.md Uploads an object from a stream to a specified bucket and object name, providing a callback function to track upload progress in bytes. ```Dart import 'package:minio/minio.dart'; void main() async { final minio = Minio( endPoint: 'play.min.io', accessKey: 'Q3AM3UQ867SPQQA43P2F', secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG', ); await minio.putObject( 'mybucket', 'myobject', Stream.value(Uint8List(1024)), onProgress: (bytes) => print('$bytes uploaded'), ); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.