Table of Contents

Namespace HeroKit.FileTypes

Classes

FileType

A file type: name, MIME type, extensions and the detectors that recognize its content. Built-in types are in FileTypes.

FileTypeRegistry

A set of file types with detection by content and lookup by extension and MIME type.

FileTypes

The built-in file types and shortcuts to the shared Default registry and to UploadValidator.

IsoMediaDetector

Detects ISO base media files (MP4, MOV, M4A, 3GP, HEIC, AVIF) by the brands in the "ftyp" box.

MagicNumber

Detects a file type by fixed bytes at a fixed offset, also called a file signature.

UploadPolicy

Settings for UploadValidator.

UploadValidator

Checks whether an uploaded file is safe to accept, following the OWASP file upload advice.

ZipEntryDetector

Detects a ZIP-based file type, such as DOCX, ODT, EPUB, JAR or APK, by the names of the entries in the header.

Structs

UploadCheckResult

The result of Validate(ReadOnlySpan<byte>, string).

Interfaces

IFileTypeDetector

Recognizes a file type from the first bytes of a file.

IUploadRule

An extra check for uploads, run after the built-in checks. Add instances to Rules.

Enums

FileTypeCategory

The broad group of a file type.

UploadRejection

Why an upload was rejected.