Describe the bug
It seems that the put_object_with_content_type and put_object_stream_with_content_type methods are not setting the content type for uploaded objects on S3
To Reproduce
A minimal test which shows the issue
use s3::{bucket::Bucket, creds::Credentials};
use tokio::fs::File;
#[tokio::main]
async fn main() {
let mut file = File::open("/path/to/image.jpg")
.await
.unwrap();
let region: s3::Region = "us-west-2".parse().unwrap();
let credentials = Credentials::default().unwrap();
let bucket = Bucket::new("bucket-name", region, credentials).unwrap();
let content_type = "image/jpeg";
bucket
.put_object_stream_with_content_type(&mut file, "test/file2", content_type)
.await;
}
Expected behavior
I would expect this to show image/jpeg on the AWS web ui but instead it shows
Describe the bug It seems that the put_object_with_content_type and put_object_stream_with_content_type methods are not setting the content type for uploaded objects on S3
To Reproduce A minimal test which shows the issue
Expected behavior I would expect this to show image/jpeg on the AWS web ui but instead it shows
Environment