Crate qiniu_uploader

source
Expand description

七牛文件上传 use qiniu_uploader::{QiniuRegionEnum, QiniuUploader}; use tokio::fs;

#[tokio::main] async fn main() -> Result<(), anyhow::Error> { let qiniu = QiniuUploader::new( “access_key”, “secret_key”, “bucket”, Some(QiniuRegionEnum::Z0), false, ); let file = fs::File::open(“./Cargo.lock”).await?; let file_size = file.metadata().await?.len() as usize; qiniu .clone() .part_upload_file( “test/Cargo.lock”, file, file_size, Some(1024 * 1024 * 50), // 分片大小 Some(10), // 上传线程数量 None, // 进度条样式 ) .await?; Ok(()) }

Re-exports§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.

Structs§

Enums§