Skip to content

IMimeTypeDetector

Namespace: MJCZone.MediaMatic.Processors

Assembly: MJCZone.MediaMatic

Summary

Provides MIME type detection from file content.

abstract public

Note: This is an interface that defines a contract. Look for implementing classes in the same or related namespaces.

Contents

Methods (1)

Methods

DetectMimeTypeAsync

Detects the MIME type from a stream by inspecting file content.

csharp
Task<string?> DetectMimeTypeAsync(
    Stream stream,
    CancellationToken cancellationToken)

Parameters

  • stream (Stream) - The stream to inspect. Position will be reset after detection.
  • cancellationToken (CancellationToken) - Cancellation token.

Returns

Type: Task<string?>

The detected MIME type, or null if detection failed.