All Projects → diagnosia → flutter_aws_s3_client

diagnosia / flutter_aws_s3_client

Licence: MIT license
A simple, unofficial AWS S3 client

Programming Languages

dart
5743 projects
objective c
16641 projects - #2 most used programming language
shell
77523 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to flutter aws s3 client

secure-media
Store private media securely in WordPress.
Stars: ✭ 22 (-8.33%)
Mutual labels:  s3
cottoncandy
sugar for s3
Stars: ✭ 33 (+37.5%)
Mutual labels:  s3
s3-example
Simple example using micro for uploading stuff to AWS S3.
Stars: ✭ 45 (+87.5%)
Mutual labels:  s3
xyr
Query any data source using SQL, works with the local filesystem, s3, and more. It should be a very tiny and lightweight alternative to AWS Athena, Presto ... etc.
Stars: ✭ 58 (+141.67%)
Mutual labels:  s3
Sree
S3 client for human beings
Stars: ✭ 55 (+129.17%)
Mutual labels:  s3
krawler
A minimalist (geospatial) ETL
Stars: ✭ 51 (+112.5%)
Mutual labels:  s3
logstash-output-s3
No description or website provided.
Stars: ✭ 55 (+129.17%)
Mutual labels:  s3
backup-repository
Backup storage for E2E GPG-encrypted files, with multi-user, quotas, versioning, using a object storage (S3/Min.io/GCS etc.) and deployed on Kubernetes or standalone.
Stars: ✭ 21 (-12.5%)
Mutual labels:  s3
terraform-aws-s3-bucket
Terraform module that creates an S3 bucket with an optional IAM user for external CI/CD systems
Stars: ✭ 138 (+475%)
Mutual labels:  s3
hub
Public reusable components for Polyaxon
Stars: ✭ 8 (-66.67%)
Mutual labels:  s3
smockin
Dynamic API, S3 & Mail mocking for web, mobile & microservice development.
Stars: ✭ 74 (+208.33%)
Mutual labels:  s3
s3-concat
Concat multiple files in s3
Stars: ✭ 35 (+45.83%)
Mutual labels:  s3
ndstore
code for storing neurodata images and image annotations
Stars: ✭ 39 (+62.5%)
Mutual labels:  s3
spring-file-storage-service
The FSS(file storage service) APIs make storing the blob file easy and simple .
Stars: ✭ 33 (+37.5%)
Mutual labels:  s3
sls-photos-upload-service
Example web app and serverless API for uploading photos and saving to S3 and DynamoDB
Stars: ✭ 50 (+108.33%)
Mutual labels:  s3
s3 asset deploy
Deploy & manage static assets on S3 with rolling deploys & rollbacks in mind.
Stars: ✭ 63 (+162.5%)
Mutual labels:  s3
backblaze
Backblaze.Agent is a high-performance .NET Core implementation of the Backblaze B2 Cloud Storage API.
Stars: ✭ 32 (+33.33%)
Mutual labels:  s3
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+166.67%)
Mutual labels:  s3
qscamel
qscamel is a command line tool to migrate data between different endpoint efficiently.
Stars: ✭ 34 (+41.67%)
Mutual labels:  s3
magento-s3
Use Amazon S3 as the file storage solution for your Magento store
Stars: ✭ 62 (+158.33%)
Mutual labels:  s3

Pub Package

DEPRECATED

Since there is now an official package for accessing AWS services, I decided to not longer support this package. please migrate to https://github.com/aws-amplify/amplify-flutter / https://pub.dev/packages/amplify_storage_s3/example

flutter_aws_s3_client

Supports downloading objects and listing objects in a bucket.

The heavy lifting was done by Amazon Cognito Identity SDK for Dart, this project contains just convenience methods for common use cases.

if you need more requests, you can use this instead to build what you need. If you implement more methods, feel free to open a pull request.

Usage

Build the client

  const region = "eu-central-1";
  const bucketId = "yourBucketId";
  final AwsS3Client s3client = AwsS3Client(
      region: region,
      host: "s3.$region.amazonaws.com",
      bucketId: bucketId,
      accessKey: "<your access key>",
      secretKey: "<your secret key>");

Get an object

final response = await s3client.getObject("your/object/key"); 

List objects of the bucket

ListBucketResult listBucketResult =
  await s3client.listObjects(prefix: "dir1/dir2/", delimiter: "/");
print(listBucketResult.toString());

If you want to use a custom http client, use the method buildSignedGetParams. This method returns an object containing the URL and the Authorization headers, which can be used to build the request with your preferred http client.

Download a large object to a file without keeping everything in-memory (streaming)

Use the buildSignedGetParams method.

Example code (with ETag support):

Future download(String key, File file, [String etag = null]) async {

  final signedParams = awsS3Client.buildSignedGetParams(key: key);

  final request = await HttpClient().getUrl(signedParams.uri);

  for (final header in (signedParams.headers ?? const {}).entries) {
    request.headers.add(header.key, header.value);
  }
  if(eTag != null){
    request.headers.add(HttpHeaders.ifNoneMatchHeader, eTag);
  }
  final response = response = await request.close();
  if(response.statusCode != HttpStatus.ok){
     //handle error  
  }else{
     return response.pipe(file.openWrite());
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].