|
@@ -7,6 +7,7 @@ import { existsSync, mkdirSync } from 'fs';
|
|
|
import { diskStorage } from 'multer';
|
|
|
import { extname, join } from 'path';
|
|
|
import sanitize from 'sanitize-filename';
|
|
|
+import { patchFormData } from '../utils/path-form-data.util';
|
|
|
|
|
|
export const assetUploadOption: MulterOptions = {
|
|
|
fileFilter,
|
|
@@ -55,6 +56,8 @@ function filename(req: Request, file: Express.Multer.File, cb: any) {
|
|
|
return cb(new UnauthorizedException());
|
|
|
}
|
|
|
|
|
|
+ file.originalname = patchFormData(file.originalname);
|
|
|
+
|
|
|
const fileNameUUID = randomUUID();
|
|
|
|
|
|
if (file.fieldname === 'livePhotoData') {
|