mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 17:51:11 +10:00
more work on attachments
* fix frontend env usage
This commit is contained in:
7
apps/server/src/helpers/file.helper.ts
Normal file
7
apps/server/src/helpers/file.helper.ts
Normal file
@ -0,0 +1,7 @@
|
||||
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';
|
||||
}
|
||||
@ -1 +1,3 @@
|
||||
export * from './utils';
|
||||
export * from './nanoid.utils';
|
||||
export * from './file.helper';
|
||||
|
||||
Reference in New Issue
Block a user