async fn put<S>(&self, location: &str, bytes: S, length: usize) -> InternalResult<()>
    where
        S: Stream<Item = io::Result<Bytes>> + Send + Sync + 'static,
    {
        let bytes = ByteStream::new_with_size(bytes, length);

        let put_request = rusoto_s3::PutObjectRequest {
            bucket: self.bucket_name.clone(),
            key: location.to_string(),
            body: Some(bytes),
            ..Default::default()
        };

        self.client
            .put_object(put_request)
            .await
            .context(UnableToPutDataToS3 {
                bucket: &self.bucket_name,
                location: location.to_string(),
            })?;
        Ok(())
    }
/// Save the provided bytes to the specified location.
Save the provided bytes to the specified location.
Save the provided bytes to the specified location .
async fn put<S>(&self, location: &str, bytes: S, length: usize) -> InternalResult<()>
    where
        S: Stream<Item = io::Result<Bytes>> + Send + Sync + 'static,
    {
        let bytes = ByteStream::new_with_size(bytes, length);
        let put_request = rusoto_s3::PutObjectRequest {
            bucket: self.bucket_name.clone(),
            key: location.to_string(),
            body: Some(bytes),
            ..Default::default()
        };
        self.client
            .put_object(put_request)
            .await
            .context(UnableToPutDataToS3 {
                bucket: &self.bucket_name,
                location: location.to_string(),
            })?;
        Ok(())
    }
async fn put < S > ( & self , location : & str , bytes : S , length : usize ) -> InternalResult < ( ) > where S : Stream < Item = io :: Result < Bytes > > + Send + Sync + ' static , { let bytes = ByteStream :: new_with_size ( bytes , length ) ; let put_request = rusoto_s3 :: PutObjectRequest { bucket : self . bucket_name . clone ( ) , key : location . to_string ( ) , body : Some ( bytes ) , .. Default :: default ( ) } ; self . client . put_object ( put_request ) . await . context ( UnableToPutDataToS3 { bucket : & self . bucket_name , location : location . to_string ( ) , } ) ? ; Ok ( ( ) ) }
Save the provided bytes to the specified location.
Save the provided bytes to the specified location .
&self
location
&str
bytes
S
length
usize