pub fn put_object_stream_blocking(
        &self,
        path: impl AsRef<Path>,
        s3_path: impl AsRef<str>,
    ) -> Result<u16> {
        let mut rt = Runtime::new()?;
        Ok(rt.block_on(self.put_object_stream(path, s3_path))?)
    }
/// Stream file from local path to s3, blockIng.
///
/// # Example:
///
/// ```rust,no_run
///
/// use s3::bucket::Bucket;
/// use s3::creds::Credentials;
/// use s3::S3Error;
/// use std::fs::File;
///
/// fn main() -> Result<(), S3Error> {
///
///     let bucket_name = "rust-s3-test";
///     let region = "us-east-1".parse()?;
///     let credentials = Credentials::default()?;
///     let bucket = Bucket::new(bucket_name, region, credentials)?;
///
///     let status_code = bucket.put_object_stream_blocking("foo.txt", "/test_file")?;
///     println!("Code: {}", status_code);
///     Ok(())
/// }
/// ```
Stream file from local path to s3, blockIng.
Stream file from local path to s3 blockIng .
pub fn put_object_stream_blocking(
        &self,
        path: impl AsRef<Path>,
        s3_path: impl AsRef<str>,
    ) -> Result<u16> {
        let mut rt = Runtime::new()?;
        Ok(rt.block_on(self.put_object_stream(path, s3_path))?)
    }
pub fn put_object_stream_blocking ( & self , path : impl AsRef < Path > , s3_path : impl AsRef < str > , ) -> Result < u16 > { let mut rt = Runtime :: new ( ) ? ; Ok ( rt . block_on ( self . put_object_stream ( path , s3_path ) ) ? ) }
Stream file from local path to s3, blockIng.
Stream file from local path to s3 blockIng .
&self
path
impl AsRef<Path>
s3_path
impl AsRef<str>
&self
path
impl AsRef<Path>
s3_path
impl AsRef<str>
example:


use s3::bucket::Bucket;
use s3::creds::Credentials;
use s3::S3Error;
use std::fs::File.



let bucket_name = "rust-s3-test";
let region = "us-east-1".parse()?;
let credentials = Credentials::default()?;
let bucket = Bucket::new(bucket_name, region, credentials)?.

let status_code = bucket.put_object_stream_blocking("foo.txt", "/test_file")?;
println!("Code: {}", status_code);
Ok(())
}
```
use s3 :: bucket :: Bucket ; use s3 :: creds :: Credentials ; use s3 :: S3Error ; use std :: fs :: File . let bucket_name = " rust - s3 - test " ; let region = " us - east - 1 " . parse () ? ; let credentials = Credentials :: default () ? ; let bucket = Bucket :: new ( bucket_name region credentials ) ? . let status_code = bucket . put_object_stream_blocking ( " foo . txt " " / test_file " ) ? ; println! ( " Code : {} " status_code ) ; Ok (( )) } ` ` `