How to detect file mime by file header on Nginx?

824 Views Asked by At

I want to return a file stored without extension name.
But nginx returns it with application/octet-stream.

I want return a file with correct mime, based on file header but not extension name, like using file --mime-type -b <filename>

How should I do?

0

There are 0 best solutions below