mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-26 10:23:28 +08:00
fix: restore download button when file type is selected in agent message (#17184)
This commit is contained in:
@@ -315,32 +315,6 @@ function MessageItem({
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{/* {isAssistant && item.attachment && item.attachment.doc_id && (
|
||||
<div className="w-full flex items-center justify-end">
|
||||
<Button
|
||||
variant="link"
|
||||
className="p-1 m-0 h-auto text-text-sub-title-invert"
|
||||
onClick={async () => {
|
||||
if (item.attachment?.doc_id) {
|
||||
try {
|
||||
const response = await downloadFile({
|
||||
docId: item.attachment.doc_id,
|
||||
ext: item.attachment.format,
|
||||
});
|
||||
const blob = new Blob([response.data], {
|
||||
type: response.data.type,
|
||||
});
|
||||
downloadFileFromBlob(blob, item.attachment.file_name);
|
||||
} catch (error) {
|
||||
console.error('Download failed:', error);
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Download size={16} />
|
||||
</Button>
|
||||
</div>
|
||||
)} */}
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user