fix(media): add missing MIME type mappings for audio/video files

Add mappings for audio/x-m4a, audio/mp4, and video/quicktime to ensure
media files sent as documents are saved with proper extensions, enabling
automatic transcription/analysis tools to work correctly.

- audio/x-m4a → .m4a
- audio/mp4 → .m4a
- video/quicktime → .mov

Also adds comprehensive test coverage for extensionForMime().
This commit is contained in:
Bruno Guidolim
2026-01-28 13:17:50 +01:00
parent d93f8ffc13
commit 57efd8e083
2 changed files with 48 additions and 1 deletions

View File

@@ -13,7 +13,10 @@ const EXT_BY_MIME: Record<string, string> = {
"image/gif": ".gif",
"audio/ogg": ".ogg",
"audio/mpeg": ".mp3",
"audio/x-m4a": ".m4a",
"audio/mp4": ".m4a",
"video/mp4": ".mp4",
"video/quicktime": ".mov",
"application/pdf": ".pdf",
"application/json": ".json",
"application/zip": ".zip",