mirror of
https://github.com/docmost/docmost.git
synced 2026-05-16 05:44:04 +08:00
d4eefa48a8
* set log level based on env
8 lines
230 B
TypeScript
8 lines
230 B
TypeScript
import * as mime from 'mime-types';
|
|
import * as path from 'node:path';
|
|
|
|
export function getMimeType(filePath: string): string {
|
|
const ext = path.extname(filePath);
|
|
return mime.contentType(ext) || 'application/octet-stream';
|
|
}
|