Reputation: 7058
I want to open files from S3 served by Nginx in a browser. Was unable to get it working with following config
Files in S3 buckets are text files with extension .manefiest
location /manefiest/ {
proxy_pass http://my-bucket.s3-website-us-west-2.amazonaws.com/;
types {
text/html manefiest;
text/plain manefiest;
}
}
I want browser to show the contents of the file. But with above config it was downloading the file.
Whats wrong here ?
Upvotes: 4
Views: 887
Reputation: 7058
Setting contentType:"text/plain"
for uploaded file solved the problem.
Thanks @ofirule
Upvotes: 3