aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

software.amazon.awssdk.services.s3.S3AsyncClient#putObject does not detect Content-Type

Open adrian-skybaker opened this issue 6 years ago • 7 comments

If the synchronous S3 client is used to put an object into a bucket, the Content-Type metadata property is set based an auto-detection of mime type (software.amazon.awssdk.core.sync.RequestBody#fromFile(java.nio.file.Path)).

If the asynchronous client is used to put the same object, it's Content-Type is always set to binary/octet-stream, no auto-detection is done.

  • AWS Java SDK version used: 2.13.23

adrian-skybaker avatar Jun 08 '20 21:06 adrian-skybaker

Can you provide a reproducible code sample?

debora-ito avatar Jun 09 '20 23:06 debora-ito

No, sorry. All that's required though is a call to software.amazon.awssdk.services.s3.S3AsyncClient#putObject

adrian-skybaker avatar Jun 11 '20 05:06 adrian-skybaker

@adrian-skybaker I finally got some time to repro this and I can confirm I see the issue, thank you for reporting it.

debora-ito avatar Jul 10 '20 20:07 debora-ito

@debora-ito do you any updates on this issue?

SergeyBrenko avatar Aug 12 '20 14:08 SergeyBrenko

@SergeyBrenko no updates at this time.

debora-ito avatar Aug 12 '20 17:08 debora-ito

A new support to fix this has been added in #2239.

Quanzzzz avatar Jan 20 '21 00:01 Quanzzzz

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Feb 08 '21 22:02 github-actions[bot]