Crates.io | aliyun-oss-rs |
lib.rs | aliyun-oss-rs |
version | 0.0.7 |
source | src |
created_at | 2023-06-15 14:50:45.413125 |
updated_at | 2024-07-04 15:13:26.905469 |
description | A non-official Rust SDK implementation for Alibaba Cloud OSS. |
homepage | |
repository | https://github.com/EthanWinton/aliyun-oss-rs |
max_upload_size | |
id | 891164 |
size | 139,821 |
阿里云对象存储服务(Object Storage Service,简称 OSS)的非官方 SDK 实现,无复杂结构设计,链式风格
let client = OssClient::new("Your AccessKey ID","Your AccessKey Secret");
let buckets = client.list_buckets().set_prefix("rust").send().await;
let bucket = client.bucket("for-rs-test","oss-cn-zhangjiakou.aliyuncs.com")
.list_objects()
.set_max_objects(200)
.set_prefix("rust")
.send()
.await;
let object = client.bucket("for-rs-test").object("rust.png");
let result = object.put_object().send_file("Your File Path").await;
use chrono::{Duration, Local};
let date = Local::now().naive_local() + Duration::days(3);
let url = object.get_url().url(date);
基础操作
存储空间管理
文件管理