sniff file mime type and use it

Instead of using octet stream use the actual mime type - this is needed for serving web content from aws/cloudfront.