Skip to content

Identify MIME content type by analysing the file binary header

License

Notifications You must be signed in to change notification settings

GetoXs/MimeDetect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%