pub fn presign_put<S: AsRef<str>>(
        &self,
        path: S,
        expiry_secs: u32,
        custom_headers: Option<HeaderMap>,
    ) -> Result<String> {
        validate_expiry(expiry_secs)?;
        let request = Request::new(
            self,
            path.as_ref(),
            Command::PresignPut {
                expiry_secs,
                custom_headers,
            },
        );
        Ok(request.presigned()?)
    }
/// Get a presigned url for putting object to a given path
///
/// # Example:
///
/// ```rust,no_run
/// use s3::bucket::Bucket;
/// use s3::creds::Credentials;
///
/// let bucket_name = "rust-s3-test";
/// let region = "us-east-1".parse().unwrap();
/// let credentials = Credentials::default().unwrap();
/// let bucket = Bucket::new(bucket_name, region, credentials).unwrap();
///
/// let mut custom_headers = reqwest::header::HeaderMap::new();
/// custom_headers.insert(
///    reqwest::header::HeaderName::from_static("custom_header"),
///    reqwest::header::HeaderValue::from_str("custom_value").unwrap(),
/// );
///
/// let url = bucket.presign_put("/test.file", 86400, Some(custom_headers)).unwrap();
/// println!("Presigned url: {}", url);
/// ```
Get a presigned url for putting object to a given path
Get a presigned url for putting object to a given path
pub fn presign_put<S: AsRef<str>>(
        &self,
        path: S,
        expiry_secs: u32,
        custom_headers: Option<HeaderMap>,
    ) -> Result<String> {
        validate_expiry(expiry_secs)?;
        let request = Request::new(
            self,
            path.as_ref(),
            Command::PresignPut {
                expiry_secs,
                custom_headers,
            },
        );
        Ok(request.presigned()?)
    }
pub fn presign_put < S : AsRef < str > > ( & self , path : S , expiry_secs : u32 , custom_headers : Option < HeaderMap > , ) -> Result < String > { validate_expiry ( expiry_secs ) ? ; let request = Request :: new ( self , path . as_ref ( ) , Command :: PresignPut { expiry_secs , custom_headers , } , ) ; Ok ( request . presigned ( ) ? ) }
Get a presigned url for putting object to a given path
Get a presigned url for putting object to a given path
&self
path
S
expiry_secs
u32
custom_headers
Option<HeaderMap>
&self
path
S
expiry_secs
u32
custom_headers
Option<HeaderMap>
example:
```rust,no_run
use s3::bucket::Bucket;
use s3::creds::Credentials.

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

let mut custom_headers = reqwest::header::HeaderMap::new();
custom_headers.insert(
reqwest::header::HeaderName::from_static("custom_header"),
reqwest::header::HeaderValue::from_str("custom_value").unwrap(),
).

let url = bucket.presign_put("/test.file", 86400, Some(custom_headers)).unwrap();
println!("Presigned url: {}", url);
```
` ` ` rust no_run use s3 :: bucket :: Bucket ; use s3 :: creds :: Credentials . let bucket_name = " rust - s3 - test " ; let region = " us - east - 1 " . parse () . unwrap () ; let credentials = Credentials :: default () . unwrap () ; let bucket = Bucket :: new ( bucket_name region credentials ) . unwrap () . let mut custom_headers = reqwest :: header :: HeaderMap :: new () ; custom_headers . insert ( reqwest :: header :: HeaderName :: from_static ( " custom_header " ) reqwest :: header :: HeaderValue :: from_str ( " custom_value " ) . unwrap () ) . let url = bucket . presign_put ( " / test . file " 86400 Some ( custom_headers )) . unwrap () ; println! ( " Presigned url : {} " url ) ; ` ` `