tsoa-zod-validator
Version:
Zod validation decorators for tsoa
14 lines (13 loc) • 522 B
TypeScript
/**
* Parses a file size string (e.g., '10MB') to bytes
* @param size The size to parse
* @returns The size in bytes
*/
export declare function parseFileSize(size: string | number): number;
/**
* Validates if a file's MIME type is in the allowed types list
* @param fileMimeType The file's MIME type
* @param allowedTypes The list of allowed MIME types
* @returns True if the file type is allowed, false otherwise
*/
export declare function isValidFileType(fileMimeType: string, allowedTypes: string[]): boolean;