更改特定文件扩展名的 S3 存储桶策略中的内容类型

Tib*_*abo 4 amazon-s3 amazon-web-services

目前,当我将属性列表文件(plist 扩展名)放置到 S3 存储桶时,它出于某种原因将 Content-type 设置为 application/octet-stream。当我在 Objective-C (iOS) 中下载它时会导致问题。

如何更改存储桶策略,使其自动将 Content-type 设置为 text/plain

Shi*_*his 5

你不能。默认的内容类型是“application/octet-stream”。

请在以下 aws 文档中找到相同的 http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html

您唯一的选择是在上传时设置内容类型或在上传完成后更新它。