flutter_oss_aliyun 0.0.9 copy "flutter_oss_aliyun: ^0.0.9" to clipboard
flutter_oss_aliyun: ^0.0.9 copied to clipboard

outdated

oss aliyun plugin for flutter and upport STS to access OSS temporarily

flutter_oss_aliyun #

Oss aliyun plugin for flutter. Use sts policy to authenticate the user.

flutter pub: https://pub.flutter-io.cn/packages/flutter_oss_aliyun

Feature has Supported #

  • ✅ upload object
  • ✅ get object
  • ✅ save object in files
  • ✅ delete object

Feature ready to Support #

  • ❌ List buckets
  • ❌ callback when upload object
  • ❌ upload multiple objects at once
  • ❌ delete multiple objects at once

Usage #

First, add flutter_oss_aliyun as a dependency in your pubspec.yaml file.

dependencies:
  flutter_oss_aliyun: ^0.0.9

Don't forget to flutter pub get.

1. init the client #

Client.init(
    stsUrl: "server url get sts token",
    ossEndpoint: "oss-cn-beijing.aliyuncs.com",
    bucketName: "bucket name",
);

2. put the object to oss #

final bytes = "file bytes".codeUnits;
await Client().putObject(bytes, "test.txt");

3. get the object from oss #

await Client().getObject("test.txt");

4. download the object from oss #

await Client().downloadObject("test.txt", "./example/test.txt");

5. download the object from oss #

await Client().deleteObject("test.txt");
68
likes
0
points
1.11k
downloads

Publisher

verified publisherhuhx.cn

Weekly Downloads

oss aliyun plugin for flutter and upport STS to access OSS temporarily

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, dio, flutter, mime_type

More

Packages that depend on flutter_oss_aliyun