MimeMapping 1.0.1.50
dotnet add package MimeMapping --version 1.0.1.50
NuGet\Install-Package MimeMapping -Version 1.0.1.50
<PackageReference Include="MimeMapping" Version="1.0.1.50" />
paket add MimeMapping --version 1.0.1.50
#r "nuget: MimeMapping, 1.0.1.50"
// 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
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 |
---|---|
.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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.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 net481 |
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 |
-
.NETStandard 1.1
- NETStandard.Library (>= 1.6.1)
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
NuGet packages (66)
Showing the top 5 NuGet packages that depend on MimeMapping:
Package | Downloads |
---|---|
SparkPost
SparkPost API |
|
Sitko.Core.Storage
Sitko.Core is a set of libraries to help build .NET Core applications fast |
|
Mosaik.Library
Package Description |
|
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
|
|
BMW-InnovationLab/BMW-Labeltool-Lite
This repository provides you with an easy-to-use labeling tool for State-of-the-art Deep Learning training purposes. It supports Auto-Labeling.
|
Version | Downloads | Last updated |
---|---|---|
1.0.1.50 | 134,198 | 11/16/2022 |
1.0.1.37 | 2,358,579 | 1/22/2021 |
1.0.1.35 | 51,368 | 1/14/2021 |
1.0.1.30 | 991,004 | 6/18/2020 |
1.0.1.26 | 572,390 | 12/5/2019 |
1.0.1.21 | 5,020 | 12/3/2019 |
1.0.1.17 | 227,254 | 9/23/2019 |
1.0.1.15 | 69,960 | 8/25/2019 |
1.0.1.14 | 46,134 | 8/9/2019 |
1.0.1.12 | 1,124,212 | 11/15/2017 |
1.0.1.10 | 95,531 | 8/18/2017 |
0.1.6 | 33,286 | 8/3/2017 |
0.1.5.9 | 940 | 8/7/2017 |
0.1.5 | 22,960 | 2/21/2017 |
0.1.4 | 1,722 | 11/12/2016 |
0.1.3 | 1,212 | 11/8/2016 |
0.1.2 | 1,775 | 11/6/2016 |
0.1.1 | 1,306 | 11/6/2016 |
0.1.0 | 1,543 | 11/6/2016 |