/MimeTypes

A simple lookup from file name/extension to MIME/media type, generated from Apache's mime.types.

Primary LanguagePuppetApache License 2.0Apache-2.0

MimeTypes

A simple lookup from file name/extension to MIME/media type, generated from Apache's mime.types.

Usage

Get the MIME/media type for a file name/extension by using the MimeTypes.GetMimeType method:

MimeTypes.GetMimeType("awesome-file.json"); // "application/json"

Installation

It's just a simple, generated .cs file! To get it, either

  • Pull the checked in version from GitHub.
  • Pull the source and generate an updated version yourself.
  • Install the NuGet package (contains the single source file).