MCPcopy Create free account
hub / github.com/TomClive/SeeDance2Stitcher / getMime

Function getMime

server.js:79–90  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

77}
78
79function getMime(filePath) {
80 const ext = path.extname(filePath).toLowerCase();
81 return {
82 ".html": "text/html; charset=utf-8",
83 ".css": "text/css; charset=utf-8",
84 ".js": "text/javascript; charset=utf-8",
85 ".mp4": "video/mp4",
86 ".jpg": "image/jpeg",
87 ".jpeg": "image/jpeg",
88 ".png": "image/png"
89 }[ext] || "application/octet-stream";
90}
91
92function cleanBaseName(name, fallback) {
93 const base = path.basename(name || fallback || "clip", path.extname(name || ""));

Callers 1

serveFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected