MimeMapping 2.1.0
See the version list below for details.
dotnet add package MimeMapping --version 2.1.0
NuGet\Install-Package MimeMapping -Version 2.1.0
<PackageReference Include="MimeMapping" Version="2.1.0" />
paket add MimeMapping --version 2.1.0
#r "nuget: MimeMapping, 2.1.0"
// Install MimeMapping as a Cake Addin #addin nuget:?package=MimeMapping&version=2.1.0 // Install MimeMapping as a Cake Tool #tool nuget:?package=MimeMapping&version=2.1.0
MimeMapping
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:
- https://www.iana.org/assignments/media-types/media-types.xhtml
- https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
- https://hg.nginx.org/nginx/raw-file/default/conf/mime.types
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 Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.1
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (78)
Showing the top 5 NuGet packages that depend on MimeMapping:
Package | Downloads |
---|---|
Gotenberg.Sharp.API.Client
C# API client for interacting with the Gotenberg v7 & v8 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. |
|
SparkPost
SparkPost API |
|
Sitko.Core.Storage
Sitko.Core is a set of libraries to help build .NET Core applications fast |
|
Mosaik.Library
Package Description |
|
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 (14)
Showing the top 5 popular GitHub repositories that depend on MimeMapping:
Repository | Stars |
---|---|
Jackett/Jackett
API Support for your favorite torrent trackers
|
|
DynamoDS/Dynamo
Open Source Graphical Programming for Design
|
|
WebVella/WebVella-ERP
Free and open-source pluggable ERP and CRM software based on ASP.NET Core 8, RazorPages and PostgreSQL . Targets Linux or Windows as host OS.
|
|
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
|
|
jenius-apps/nightingale-rest-api-client
A modern, resource-efficient REST API client for Windows
|
Version | Downloads | Last updated |
---|---|---|
3.0.1 | 971,427 | 2/15/2024 |
3.0.0 | 1,042 | 2/15/2024 |
2.1.0 | 30,020 | 2/14/2024 |
2.0.0 | 1,511,020 | 3/30/2023 |
1.0.1.50 | 1,051,807 | 11/16/2022 |
1.0.1.37 | 5,286,744 | 1/22/2021 |
1.0.1.35 | 62,363 | 1/14/2021 |
1.0.1.30 | 1,244,046 | 6/18/2020 |
1.0.1.26 | 726,785 | 12/5/2019 |
1.0.1.21 | 6,648 | 12/3/2019 |
1.0.1.17 | 312,298 | 9/23/2019 |
1.0.1.15 | 101,087 | 8/25/2019 |
1.0.1.14 | 62,298 | 8/9/2019 |
1.0.1.12 | 1,435,575 | 11/15/2017 |
1.0.1.10 | 98,219 | 8/18/2017 |
0.1.6 | 54,325 | 8/3/2017 |
0.1.5.9 | 1,820 | 8/7/2017 |
0.1.5 | 23,931 | 2/21/2017 |
0.1.4 | 2,600 | 11/12/2016 |
0.1.3 | 2,067 | 11/8/2016 |
0.1.2 | 2,693 | 11/6/2016 |
0.1.1 | 2,210 | 11/6/2016 |
0.1.0 | 4,083 | 11/6/2016 |