浏览代码

fix: [Chat] Fixed the problem that the file attachment URL error in the dialog box (#2589)

YyumeiZhang 10 月之前
父节点
当前提交
7259dc8107
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/semi-ui/chat/chatBox/chatBoxContent.tsx

+ 1 - 1
packages/semi-ui/chat/chatBox/chatBoxContent.tsx

@@ -68,7 +68,7 @@ const ChatBoxContent = (props: ChatBoxContentProps) => {
                     } else if (item.type === 'file_url') {
                         const { name, size, url, type } = item.file_url;
                         const realType = name.split('.').pop() ?? type?.split('/').pop();
-                        return <FileAttachment key={`index`} url={name} name={name} size={size} type={realType}></FileAttachment>;
+                        return <FileAttachment key={`index`} url={url} name={name} size={size} type={realType}></FileAttachment>;
                     }
                     return null;
                 });