There is a helper library for looking up MIME types: Mime
var mime = require('mime');
mime.getType('/path/to/file.txt'); // => 'text/plain'
But it still uses the extension for lookup though.
There is a helper library for looking up MIME types: Mime
var mime = require('mime');
mime.getType('/path/to/file.txt'); // => 'text/plain'
But it still uses the extension for lookup though.