v1.5.0
aws_s3_upload
一个简单便捷的 S3 上传包。
31喜欢 657近 30 天下载110Pub 分数
AndroidiOSmacOSWindowsLinux
一个简单便捷的 Flutter 包,用于上传到 S3
{"sdk":"flutter"}^3.5.0^1.1.0^1.8.0^4.1.0{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
A simple, convenient package for uploading to S3.
Heavily inspired by this stackoverflow answer
Having created credentials on AWS, upload a file like so:
AwsS3.uploadFile(
accessKey: "AKxxxxxxxxxxxxx",
secretKey: "xxxxxxxxxxxxxxxxxxxxxxxxxx",
file: File("path_to_file"),
bucket: "bucket_name",
region: "us-east-2",
metadata: {"test": "test"} // optional
);
Before using this package, consider if it's acceptable to include AWS keys in your final app. Doing so might be okay for internal or trusted apps, but think twice before including keys in an app published on the app store.
There already exists a number of Flutter plugins for interacting with S3, some of which are more actively maintained. This small library was built because the few I tried either failed to work out of the box, or required the use of a Pool ID and AWS Cognito, which my project doesn't use. YMMV.