export type FileType = 'link' | 'image' | 'txt' | 'doc' | 'xls' | 'pdf' | 'csv' | 'html' | 'json' | 'mp4' | 'mkv' | 'compressed' | 'unknown'; export type FormattedFile = { name: string; type: string; size: number; webkitRelativePath: string; fileType: FileType; file: File; imgPreviewURL?: string; uploadProgress?: number; controller?: AbortController; isCanceled?: boolean; }; /** * Maps a mime type to a custom file type. * * @param {string} mimeType * @returns {CustomFileType} */ export declare const getFileType: (mimeType: string) => FileType; /** * Formats a file into a FormattedFile object. * * @param file The file to be formatted. * @returns A FormattedFile object. */ export declare const formatFile: (file: File) => FormattedFile; /** * Checks if a file is under the maximum size limit. * * @param file The file to be checked. * @param customFileSize The maximum size limit in megabytes. @default 1 * @returns True if the file is under the maximum size limit, false otherwise. */ export declare const validateFileSize: (file: File, customFileSize?: number) => boolean; /** * Checks if a file has a valid type. * Make sure user doesn't upload a folder. * * @param file The file to be checked. * @returns True if the file has a valid type, false otherwise. */ export declare const validateFileType: (file: File) => boolean;