Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Latest commit

 

History

History
35 lines (24 loc) · 721 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 721 Bytes

MimeBank

MimeBank is a file-type checker for dotnet.

Users upload stuff to your server. You should be checking the file type of the uploaded file. Don't take the file extension for granted. Make sure the JPG is a JPG.

Version

1.0.1

Usage

  MimeChecker mimeChecker = new MimeChecker();
  FileHeader header = mimeChecker.GetFileHeader("PATH_TO_FILE");
  Assert.AreEqual(header.Type, FileType.Image, "File should be an image");
  Assert.AreEqual(header.Extension, "jpg", "File format should be a jpg");

NuGet

To install MimeBank, run the following command in the Package Manager Console

PM> Install-Package MimeBank

License

Apache License 2.0