fix: file download in chat (#11322)

This commit is contained in:
zxhlyh 2024-12-04 11:10:56 +08:00 committed by GitHub
parent e240424be5
commit 98a1b01b0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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' 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) => { onClick={(e) => {
e.stopPropagation() e.stopPropagation()
downloadFile(url || '', name) downloadFile(url || base64Url || '', name)
}} }}
> >
<RiDownloadLine className='w-4 h-4 text-text-tertiary' /> <RiDownloadLine className='w-4 h-4 text-text-tertiary' />

View File

@ -80,7 +80,7 @@ const FileItem = ({
} }
</div> </div>
{ {
showDownloadAction && ( showDownloadAction && url && (
<ActionButton <ActionButton
size='m' size='m'
className='hidden group-hover/file-item:flex absolute -right-1 -top-1' className='hidden group-hover/file-item:flex absolute -right-1 -top-1'