From 98a1b01b0c5ff4f5a7550c7948739d02d99f8a37 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Wed, 4 Dec 2024 11:10:56 +0800 Subject: [PATCH] fix: file download in chat (#11322) --- .../file-uploader-in-chat-input/file-image-item.tsx | 2 +- .../file-uploader/file-uploader-in-chat-input/file-item.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx index 4595280893..6e9ef489fc 100644 --- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx +++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx @@ -84,7 +84,7 @@ const FileImageItem = ({ className='absolute bottom-0.5 right-0.5 flex items-center justify-center w-6 h-6 rounded-lg bg-components-actionbar-bg shadow-md' onClick={(e) => { e.stopPropagation() - downloadFile(url || '', name) + downloadFile(url || base64Url || '', name) }} > diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx index fcf665643c..dcf4082780 100644 --- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx +++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx @@ -80,7 +80,7 @@ const FileItem = ({ } { - showDownloadAction && ( + showDownloadAction && url && (