All the MIME/file extension pairs you will ever need. Comes with optional, magic bytes-based collision resolution:
⭐ https://github.com/lofcz/MimeTypeCore
Features:
- MIT licensed with no extra bs, unlike Mime Detective; online demo included.
- Works on anything from
.NET 4to the newest.NET Core,.netstandard 1.2is supported too. When using newer runtimes, the library utilizes some perf/qol niceties (Span,FileStream,FrozenDictionary..) - 2,000+ MIME/file extensions pairs (double that of MimeTypeMap), get one from the other, even without having a Stream. Sourced from IANA and other authoritative sources.
- If you have a
Stream, pass it along and get the file header sampled if needed (for example,.tscan be either a TypeScript file or a Transport Stream MPEG video). - Available on NuGet now as
MimeTypeCore. - Integrations for Blazor Server, WASM, MVC.
- Development tooling included to ease merging of contributions, including utils like Formatter, Inserter, Generator, and GitHub actions CI/CD.
- NUnit tested.
Top comments (0)