Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit abede62

Browse files
committed
fix(import): MP4 videos not recognized due to upstream bug
1 parent dc8a0c6 commit abede62

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

apps/server/src/services/import/mime.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ describe("#getMime", () => {
4545
["test.zip"], "application/zip"
4646
],
4747

48+
[
49+
"MP4 videos are supported",
50+
["video.mp4"], "video/mp4"
51+
],
52+
4853
[
4954
"unknown MIME type not recognized by mimeTypes.lookup",
5055
["test.fake"], false

apps/server/src/services/import/mime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const EXTENSION_TO_MIME = new Map<string, string>([
7171
[".ts", "text/x-typescript"],
7272
[".excalidraw", "application/json"],
7373
[".mermaid", "text/vnd.mermaid"],
74-
[".mmd", "text/vnd.mermaid"]
74+
[".mmd", "text/vnd.mermaid"],
75+
[".mp4", "video/mp4"] // https://github.com/jshttp/mime-types/issues/138
7576
]);
7677

7778
/** @returns false if MIME is not detected */

0 commit comments

Comments
 (0)