Skip to content

myousefi62/MimeDetect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

MimeDetect

NuGet NuGet

MimeDetect is a library that used to identify MIME content type by analysing the file binary header with optional file extension. For .NET Framework version package has fallback into urlmon.dll (Windows systems only).

This package is part of nonexisting project Winista.

Install with nuget

Install-Package Winista.MimeDetect

Install with .NET CLI

dotnet add package Winista.MimeDetect

How to use

   //init
   var mimeTypes = new MimeTypes();
   
   //usage by filepath
   var mimeType1 = mimeTypes.GetMimeTypeFromFile(filePath);
   
   //usage by bytearray
   var mimeType2 = mimeTypes.GetMimeTypeFromFile(bytes);

About

Identify MIME content type by analysing the file binary header

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%