diff --git a/src/common/utils/file.ts b/src/common/utils/file.ts index 94328e42..e019d9ee 100644 --- a/src/common/utils/file.ts +++ b/src/common/utils/file.ts @@ -193,6 +193,7 @@ export async function uri2local(uri: string, fileName: string | null = null): Pr // res.ext = pathInfo.ext } } + fileName = fileName.replace(/[/\\:*?"<>|]/g, '_'); res.fileName = fileName; filePath = path.join(getTempDir(), uuidv4() + fileName); fs.writeFileSync(filePath, buffer);