Tibidabo
Tibidabo

Reputation: 21571

Change content-type in S3 bucket policy for a specific file extension

Currently when I place a property list file (plist extension) to a S3 bucket, it sets the Content-type to application/octet-stream for some reason. It causes issues when I download it in Objective-C (iOS).

How can change the bucket policy so it automatically sets the Content-type to text/plain

Upvotes: 6

Views: 12372

Answers (3)

Mustafa
Mustafa

Reputation: 5347

You can change the Content-Type using the metadata properties of the file in S3 : enter image description here

Upvotes: 1

Greg Long
Greg Long

Reputation: 1

If you're on windows, and use CloudBerry, you can have a rule to set the Content-type for plist extension's automatically. I use this for iOS files and it works great. I dont have to remember to set it each time.

Greg

Upvotes: -3

Shibashis
Shibashis

Reputation: 8411

You cannot. The default content-type is "application/octet-stream".

Please find below the aws documentation for the same http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html

The only option you have is setting the content-type at the time of upload or updating it once the upload is complete.

Upvotes: 9

Related Questions