Skip to content

Commit f69a87a

Browse files
zgqgitdolphin0618
andauthored
fix: chat filename (#1855)
Co-authored-by: dolphin <[email protected]>
1 parent a3f603e commit f69a87a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/frontend/client/src/components/Chat/Input/Files/FileContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const FileContainer = ({
1717
// 聊天框兼容展示文件名
1818
const currentFile = useMemo(() => {
1919
if (!file.filename && file.filepath) {
20-
const fileName = file.filepath.split('/').pop();
20+
const fileName = file.filepath.split('/').pop()?.split('?').shift() || '';
2121
return {
2222
...file,
23-
filename: fileName,
23+
filename: decodeURIComponent(fileName),
2424
};
2525
}
2626
return file;

src/frontend/platform/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)