A simple lookup from file name/extension to MIME/media type, generated from Apache's mime.types.
Get the MIME/media type for a file name/extension by using the MimeTypes.GetMimeType
method:
MimeTypes.GetMimeType("awesome-file.json"); // "application/json"
If a mapping for the given file extension doesn't exist, it will fall back to MimeTypes.FallbackMimeType
, which is set to application/octet-stream
by default.
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).