mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix
This commit is contained in:
@@ -2,7 +2,7 @@ import { MultipartFile } from '@fastify/multipart';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { AttachmentType } from './attachment.constants';
|
import { AttachmentType } from './attachment.constants';
|
||||||
import { sanitizeFileName } from '../../common/helpers';
|
import { sanitizeFileName } from '../../common/helpers';
|
||||||
import { getMimeType } from '../../common/helpers/file.helper';
|
import { getMimeType } from '../../common/helpers';
|
||||||
|
|
||||||
export interface PreparedFile {
|
export interface PreparedFile {
|
||||||
buffer?: Buffer;
|
buffer?: Buffer;
|
||||||
@@ -41,7 +41,7 @@ export async function prepareFile(
|
|||||||
fileName,
|
fileName,
|
||||||
fileSize,
|
fileSize,
|
||||||
fileExtension,
|
fileExtension,
|
||||||
mimeType: getMimeType(file.originalname),
|
mimeType: getMimeType(file.filename),
|
||||||
multiPartFile: file,
|
multiPartFile: file,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user