Struct UploadCheckResult
- Namespace
- HeroKit.FileTypes
- Assembly
- HeroKit.FileTypes.dll
The result of Validate(ReadOnlySpan<byte>, string).
public readonly record struct UploadCheckResult : IEquatable<UploadCheckResult>
- Implements
- Inherited Members
- Extension Methods
Constructors
UploadCheckResult(UploadRejection, FileType?, string?)
The result of Validate(ReadOnlySpan<byte>, string).
public UploadCheckResult(UploadRejection Rejection, FileType? DetectedType, string? Message)
Parameters
RejectionUploadRejectionWhy the upload was rejected, or None.
DetectedTypeFileTypeThe type detected from the content, or null.
MessagestringA message in English that explains the rejection, or null when the upload is safe.
Properties
DetectedType
The type detected from the content, or null.
public FileType? DetectedType { get; init; }
Property Value
IsSafe
Gets whether the upload passed every check.
public bool IsSafe { get; }
Property Value
Message
A message in English that explains the rejection, or null when the upload is safe.
public string? Message { get; init; }
Property Value
Rejection
Why the upload was rejected, or None.
public UploadRejection Rejection { get; init; }