user upload file and its kept in file
directory without file extensions
so it looks like file/ID
what i had done, when user download any file, we have created a rewrite rule for the same which looks like
rewrite ^/file/(.+?)/(.*)$ /file/$1;
http://example.com/file/id/name.mp4 -> http://example.com/file/id
now, the problem i face is nginx is giving content-type (mime) a application/octet-stream
Which is not the actual mime type of file, this is because default mime type is application/octet-stream
i also know we can change the same using nginx configuration,
But my question is that can we set mime-type base on the url file extension