Skip to content

This is a generated library that has a huge amout of mime-types integrated

License

Notifications You must be signed in to change notification settings

frankhaugen/Frank.MimeTypes

Repository files navigation

MimeTypes

.NET CI/CD Workflow

This library provides a simple way to get the mime type of a file extension or the file extension of a mime type.

Installation

.NET CLI

dotnet add package Frank.MimeTypes

Package Manager

Install-Package Frank.MimeTypes

Package Reference

<PackageReference Include="Frank.MimeTypes" Version="*" />

Usage

Namespace

using Frank.MimeTypes;

Get mime type from file extension

var mimeType = MimeTypes.GetMimeType("txt");

Get file extension from mime type

var fileExtension = MimeTypes.GetFileExtension("text/plain");

License

This project is licensed under the MIT License - see the LICENSE file for details