How to configure the S3 byte file header as follows:
content encoding: gzip content-type: text / css
I am using the Amazon API using the SDK for .NET. I upload a file to S3 using PutObjectRequest. The problem is that when loading a file, the content headers and the content headers are not updated (I checked the file properties on the Amazon console).
Example:
request.AddHeader("expires", EXPIRES_DATE); request.AddHeader("content-encoding", "gzip"); request.ContentType = "text/css";
Also tried:
NameValueCollection metadata = new NameValueCollection(); metadata.Add("content-type", "text/css"); metadata.Add("content-encoding", "gzip"); request.WithMetaData(metadata);
What am I doing wrong?
source share