Since you are using a custom storage extension, as mentioned in my comment, I think the error is in there.
As Peter mentions, the mime type is not part of the file, but should be set by the web application serving the file.
If you have added an additional mime type in Tridion, and that is also used when calling AddBinary
in your TBB, then you should have it available in the Storage Extension.
Either use one of the overloads of AddBinary, like engine.PublishingContext.RenderedItem.AddBinary(stream, filename, sg, variant, relatedComponent, mimeType);
, or the default which I expect sets the mime type from the multimedia Component.
A rough guess would be to adjust the following code in the Storage Extension:
public void configure() throws Exception {
from("direct:awss3")
.setHeader(S3Constants.KEY, method(this, "stripFirstChar(${in.header.CamelFileName})"))
.setHeader(S3Constants.CONTENT_LENGTH, simple("${in.header.CamelFileLength}"))
.to("aws-s3://" + s3Url)
.log("ETAG for saved resource is ${in.header.CamelAwsS3ETag}");
}
That will need the mime type (or content type as it is also called) set in the header.
There might be something like S3Constants.CONTENT_TYPE
available.
binaries.xml
file.