export interface FileValidationResult {
    valid: boolean;
    error?: string;
    detectedMimeType?: string;
}
declare const ALLOWED_IMAGE_TYPES: Set<string>;
declare const ALLOWED_DOCUMENT_TYPES: Set<string>;
/**
 * Validate a file's declared MIME type against an allowlist.
 *
 * Accepts either an array (typical caller form) or a Set (legacy form).
 * Returns a plain boolean to make call-sites read naturally:
 *
 *     if (!validateMimeType(file.type, ALLOWED)) return badRequest(...)
 */
export declare function validateMimeType(mimeType: string, allowedTypes?: ReadonlyArray<string> | ReadonlySet<string>): boolean;
/**
 * Check a file's magic bytes against the declared mime type. Returns
 * `{ valid: true, detectedMimeType }` when the bytes match the declared type
 * (or when we have no signature to check), and `{ valid: false, error }`
 * otherwise.
 *
 * For container formats (WebP, AVIF) we additionally inspect the inner
 * sub-type — a generic RIFF header would otherwise let `.wav` files masquerade
 * as `.webp` and bypass image-only checks.
 *
 * For SVG (which is XML, not a binary signature) we look for `<svg` near the
 * start of the file. A leading XML declaration or BOM is allowed.
 */
export declare function checkMagicBytes(input: ArrayBuffer | Uint8Array | Buffer, declaredMimeType: string): FileValidationResult;
export { ALLOWED_IMAGE_TYPES, ALLOWED_DOCUMENT_TYPES };
//# sourceMappingURL=upload.d.ts.map