MimeMapping 1.0.1.50

.NET Standard 1.1
dotnet add package MimeMapping --version 1.0.1.50
NuGet\Install-Package MimeMapping -Version 1.0.1.50
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MimeMapping" Version="1.0.1.50" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MimeMapping --version 1.0.1.50
#r "nuget: MimeMapping, 1.0.1.50"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MimeMapping as a Cake Addin
#addin nuget:?package=MimeMapping&version=1.0.1.50

// Install MimeMapping as a Cake Tool
#tool nuget:?package=MimeMapping&version=1.0.1.50

MimeMapping

Nuget Nuget

Constants for (almost) all MIME types and method to determine MIME type from a file name. Contains just over 1000 mime types.

The Dictionary is generated from the jshttp/mime-db db.json. Works similar to .NET's System.Web.MimeMapping.GetMimeMapping.

It aggregates data from the following sources:

The library is just a literal C# Dictionary<string, string> with over 1000 entries, and a helper method that can be passed a file path.

Example Usage

string myFile = "myimage.jpg";
string mimeType = MimeMapping.MimeUtility.GetMimeMapping(myFile);
Console.WriteLine(mimeType); // output: image/jpeg

string randomFile = "data.asdf";
string mimeType = MimeMapping.MimeUtility.GetMimeMapping(randomFile);
Console.WriteLine(mimeType); // output: application/octet-stream

string rawExtension = "json";
string mimeType = MimeMapping.MimeUtility.GetMimeMapping(rawExtension);
Console.WriteLine(mimeType); // output: application/json


// List all types..
foreach(var kp in MimeMapping.MimeTypes.TypeMap)
{
	Console.WriteLine($"File extension: {kp.Key}, mime string: {kp.Value}");
}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.1 netstandard1.2 netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Windows Phone wpa81
Windows Store netcore netcore45 netcore451
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 1.1

  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (62)

Showing the top 5 NuGet packages that depend on MimeMapping:

Package Downloads
SparkPost

SparkPost API

Mosaik.Library

Package Description

Sitko.Core.Storage

Sitko.Core is a set of libraries to help build .NET Core applications fast

Gotenberg.Sharp.API.Client

C# API client for interacting with the Gotenberg v7 micro-service's API, a docker-powered stateless API for converting & merging HTML, Markdown and Office documents to PDF. The client supports a configurable Polly retry policy with exponential back-off for handling transient exceptions.

WebVella.Erp

The core library of the open-source and free platform WebVella ERP. It allows a quick and painless creation of business web applications.

GitHub repositories (9)

Showing the top 5 popular GitHub repositories that depend on MimeMapping:

Repository Stars
Jackett/Jackett
API Support for your favorite torrent trackers
WebVella/WebVella-ERP
Free and open-source pluggable ERP and CRM software based on ASP.NET Core 5, RazorPages and PostgreSQL 13. Targets Linux or Windows as host OS.
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
BedrockLauncher/BedrockLauncher
Kooboo/Kooboo
A new web development methodology for JavaScript & C# developers. A super fast and very easy to use CMS.
Version Downloads Last updated
1.0.1.50 4,028 11/16/2022
1.0.1.37 2,011,469 1/22/2021
1.0.1.35 50,589 1/14/2021
1.0.1.30 958,358 6/18/2020
1.0.1.26 554,299 12/5/2019
1.0.1.21 4,778 12/3/2019
1.0.1.17 218,561 9/23/2019
1.0.1.15 68,479 8/25/2019
1.0.1.14 44,134 8/9/2019
1.0.1.12 1,095,240 11/15/2017
1.0.1.10 95,320 8/18/2017
0.1.6 32,151 8/3/2017
0.1.5.9 921 8/7/2017
0.1.5 22,932 2/21/2017
0.1.4 1,702 11/12/2016
0.1.3 1,189 11/8/2016
0.1.2 1,750 11/6/2016
0.1.1 1,286 11/6/2016
0.1.0 1,492 11/6/2016