S3 Content-Type with Transmit
Problem
When using S3 to serve a static website, CSS files are returned with the
content-type of binary/octet-stream
. Since the content-type is incorrect, the
webpage does not load the CSS file.
Solution
I was using Transmit (4.3.2) to upload my files to S3. By default, Transmit does not set the content-type for CSS files.
To add the correct content-type for specific files with Transmit:
- Open
Preferences > Cloud
- Add Extension: css
- Name: content-type
- Value: text/css
Now re-upload your CSS files.