/** * The admin's saved type selection, intersected with the catalog. Empty when * nothing (valid) is saved. */ export function getSelectedMimeTypes(): string[]; /** * The effective allowlist: the admin's selection from the catalog (falling * back to the built-in image types when nothing is selected), EXTENDED by * `system.upload_allowed_mime_types` — the config adds operator-level types * (it does not replace, and it is not limited to the catalog). */ export function getAllowedMimeTypes(): string[]; /** * Master per-file upload size limit in megabytes. Precedence: * `system.upload_max_file_size` config (operator pin) → the admin setting * `uploadMaxFileSize` (System Setting page) → 10 MB. Invalid or non-positive * values fall back to the default. */ export function getMaxUploadFileSizeMb(): number; /** * Per-type size overrides as a `{ pattern: MB }` map. Patterns are an exact * MIME type (`video/mp4`) or a family wildcard (`video/*`). Source: the * `system.upload_max_file_size_per_type` config map (operator pin — when * present it is authoritative) → the admin setting `uploadMaxFileSizePerType` * (a list of `{ type, maxSize }` rows). Invalid entries are dropped. */ export function getUploadSizeOverrides(): {}; /** * The limit that applies to one file: exact type override → family wildcard * override (`video/*`) → the master limit. */ export function getMaxUploadFileSizeMbForType(mimetype: any): any; /** * The outer multer/busboy cap: the largest configured limit. Per-type * enforcement happens while the file streams into memory (CustomMemoryStorage) * — this cap only bounds the absolute worst case. */ export function getUploadHardCapMb(): number; export function fileFilter(request: any, file: any, cb: any): any; /** * Built-in allowed upload types. SVG is deliberately absent — SVGs can carry * scripts and are an XSS vector when served. */ export const DEFAULT_ALLOWED_MIME_TYPES: string[]; export const DEFAULT_MAX_FILE_SIZE_MB: 10; /** * The curated catalog the admin can pick allowed types from (System Setting → * File Uploads). Deliberately absent: `image/svg+xml` (SVGs can carry scripts * — an XSS vector when served) and anything script-like or executable. The * runtime intersects the saved selection with this catalog, so a type outside * it can never take effect even if written to the settings table directly. */ export const SELECTABLE_MIME_TYPES: { value: string; label: string; }[]; export function getMulter(): multer.Multer; import multer from 'multer';