This commit is contained in:
seb
2026-10-06 11:39:39 +02:00
parent b99e767c57
commit 5eb0f28300
3 changed files with 243 additions and 18 deletions

View File

@@ -7,7 +7,7 @@ import { getDefaultSkills } from './skill.js';
const FULL_HASH_REGEX = /^[a-fA-F0-9]{64}$/;
const VIRTUAL_IMAGE_FOLDERS = new Set(['image', 'images']);
function getMimeType(filePath) {
export function getMimeType(filePath) {
const ext = path.extname(filePath).toLowerCase();
switch (ext) {
case '.json': return 'application/json';
@@ -16,6 +16,7 @@ function getMimeType(filePath) {
case '.png': return 'image/png';
case '.jpg':
case '.jpeg': return 'image/jpeg';
case '.pdf': return 'application/pdf';
case '.txt': return 'text/plain';
case '.csv': return 'text/csv';
case '.md': return 'text/markdown';