Recommend this page to a friend! |
Classes of Igor Escobar | Terminal Crossword | chat-websocket/node_modules/express/node_modules/send/node_modules/mime/README.md | Download |
|
|
DownloadmimeComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. InstallInstall with npm:
API - Queriesmime.lookup(path)Get the mime type associated with a file. Performs a case-insensitive lookup using the extension in
mime.extension(type)Get the default extension for
mime.charsets.lookup()Map mime-type to charset
(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) API - Defining Custom TypesThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see requesting new types. mime.define()Add custom mime/extension mappings
The first entry in the extensions array is returned by
mime.load(filepath)Load mappings from an Apache ".types" format file
The .types file format is simple - See the |