v0.13.15
dospace
DigitalOcean Spaces API와 상호 작용하기 위한 클라이언트 라이브러리. Amazon AWS S3와 동일한 API.
22좋아요 7030일 다운로드120Pub 점수
AndroidiOSWebmacOSWindowsLinux
DigitalOcean Spaces API와 상호 작용하기 위한 Dart 클라이언트 라이브러리. Amazon AWS S3와 동일한 API.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
Client library to interact with the DigitalOcean Spaces API.
A simple usage example:
import 'dart:async';
import 'package:dospace/dospace.dart' as dospace;
main() async {
dospace.Spaces spaces = new dospace.Spaces(
region: "nyc3",
accessKey: "7Q7GAFJ4IXHQVLBRXSRX",
secretKey: "2JLXa9RqPwpavBkC7dt1MHWUDfd6onaXTXTfSYc5eQ0",
);
for (String name in await spaces.listAllBuckets()) {
print('bucket: ${name}');
dospace.Bucket bucket = spaces.bucket(name);
await for (dospace.BucketContent content in bucket.listContents(maxKeys: 3)) {
print('key: ${content.key}');
}
}
String etag = await spaces.bucket('example').uploadFile(
'README.md', 'README.md', 'text/plain', dospace.Permissions.public);
print('upload: $etag');
await spaces.close();
}