Aws-sdk-ruby: content type is not set when upload files .ics

Created on 3 Jun 2021  路  3Comments  路  Source: aws/aws-sdk-ruby

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Medata does not set content-type for ics format after upload by Aws::S3::Object or Aws::S3::Resource.new

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

  • gem 'aws-sdk-s3', '~> 1.90'

Version of Ruby, OS environment

  • ruby 2.7.2
  • ubuntu 18.04

To Reproduce (observed behavior)
s3obj = Aws::S3::Object.new("backet_name", 'test.ics', client: Aws::S3::Client.new(etc))
s3obj.upload_file('test.ics', acl: 'public-read')

小薪懈屑芯泻 褝泻褉邪薪邪 芯褌 2021-06-03 01-11-01

Expected behavior
content-type have to be set automatic
小薪懈屑芯泻 褝泻褉邪薪邪 芯褌 2021-06-03 01-11-49

guidance

Most helpful comment

Thanks for opening an issue. The Content-Type is not automatically determined for the object. When uploading the file, use the content_type param to set it to what you expect (text/calendar).

All 3 comments

Thanks for opening an issue. The Content-Type is not automatically determined for the object. When uploading the file, use the content_type param to set it to what you expect (text/calendar).

Thanks!

鈿狅笍COMMENT VISIBILITY WARNING鈿狅笍

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or 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.

Was this page helpful?
0 / 5 - 0 ratings