trueleo opened a new issue, #3725:
URL: https://github.com/apache/arrow-rs/issues/3725

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   I am trying to use object-store crate with AWS S3 where Object lock is 
enabled with versioning and some retention period. When i am trying to put 
object it is failing with following error 
   
   ``` 
   ... <Error><Code>InvalidRequest</Code><Message>Content-MD5 OR 
x-amz-checksum- HTTP header is required for Put Object requests with Object 
Lock parameters</Message> ...
   ```
   
   **Describe the solution you'd like**
   A ClientOptions method like `with_content_md5` or `with_checksum_header` 
that will calculate and attach appropriate checksum header ( before sending 
`Bytes` ) so that PUT request works.
   
   **Describe alternatives you've considered**
   None  
   
   **Additional context**
   This is minimal example I used for testing this out
   ```rust
   #[tokio::main]
   async fn main() {
       let client = AmazonS3Builder::new()
           .with_endpoint("https://s3.us-east-1.amazonaws.com";)
           .with_access_key_id(".....")
           .with_secret_access_key(".....")
           .with_bucket_name("....")
           .with_region("us-east-1")
           .build()
           .unwrap();
   
       client
           .put(
               &Path::from("foo"),
               Bytes::from_static(b"content of file"),
           )
           .await
           .unwrap();
   }
   ```
   
   [second notes section in AWS docs only talks about 
Content-MD5](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to