7 lines
482 B
TypeScript
7 lines
482 B
TypeScript
/** Detects MIME type from file header bytes. */
|
|
export declare function detectMimeFromBuffer(buf: Buffer): string | null;
|
|
/** Ensures on-disk upload content matches an allowed MIME (magic bytes, not client header). */
|
|
export declare function assertAllowedFileMagic(filePath: string, allowedMimes: Set<string>): void;
|
|
/** Removes an uploaded file after failed validation. */
|
|
export declare function removeUploadedFile(filePath: string): void;
|
|
//# sourceMappingURL=fileMagic.d.ts.map
|