Browse Source

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

YyumeiZhang 10 months ago
parent
commit
7259dc8107
1 changed files with 1 additions and 1 deletions
  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;
                 });