mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-12 15:52:32 +10:00
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';
|
|
}
|