durch / rust-s3

Rust library for interfacing with S3 API compatible services
MIT License
498 stars 195 forks source link

How to get the uploaded size in bytes? #318

Closed frederikhors closed 1 year ago

frederikhors commented 1 year ago

Using the below code I can have the size in bytes of my (stream) file:

let bytes_copied = tokio::io::copy(&mut stream, &mut file).await?;

Is there a way I can have the size of the (stream) file using:

bucket.put_object_stream(&mut stream, filename).await?;

?