import type { Kysely } from "kysely"; import type { Database } from "../../database/types.js"; import { parseAllowedMimeTypes } from "../../media/mime.js"; /** * MIME types allowed for upload by default (when no field-specific list * overrides this). Entries ending with "/" are prefix-matched (e.g. * "video/" matches "video/mp4", "video/webm", etc.). * * Image types are enumerated explicitly rather than using a bare "image/" * prefix so that "image/svg+xml" is excluded by default: there is no * upload-time content validation for SVG, so an unvalidated bare-prefix * allowlist would let a Contributor+ upload an SVG with an embedded * `