aws_s3_client 0.0.1 copy "aws_s3_client: ^0.0.1" to clipboard
aws_s3_client: ^0.0.1 copied to clipboard

outdated

Client library to interact with the AWS S3 API (and other compatible S3 services, as Yandex Cloud Storage)

AWS_S3_client #

Client library to interact with the AWS S3 API (and other compatible S3 services, such as Yandex Cloud Storage)

Usage #

A simple usage example:

import 'package:aws_s3_client/aws_s3.dart';

main() async {
  Spaces spaces = new Spaces(
    region: "region",
    accessKey: "accessKey",
    secretKey: "secretKey",
  );
  for (String name in await spaces.listAllBuckets()) {
    print('bucket: ${name}');
    if (name == 'yourBucket') {
      Bucket bucket = spaces.bucket(name);
      await for (BucketContent content
          in bucket.listContents(prefix: 'test')) {
        print('key: ${content.key}; size: ${content.size}');
      }
    }
  }
  Bucket bucket = spaces.bucket('yourBucket');

  String etag = await bucket.uploadFile(
      'test/test.md', 'README.md', 'text/plain', Permissions.public);
  print('upload: $etag');

  print('done');
}

For more usage examples please see tests

References #

Thanks https://github.com/nbspou for inspiration of creating this package

7
likes
0
pub points
65%
popularity

Publisher

unverified uploader

Client library to interact with the AWS S3 API (and other compatible S3 services, as Yandex Cloud Storage)

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, http, http_client, meta, mime, path, xml

More

Packages that depend on aws_s3_client