Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: file name incorrect when download file (#19183)
非法操作1ca6dbcdc885
diff --git a/api/core/tools/utils/message_transformer.py b/api/core/tools/utils/message_transformer.pyindex 0dbc9ccbcc7..257d96133e5 100644--- a/api/core/tools/utils/message_transformer.py+++ b/api/core/tools/utils/message_transformer.py@@ -60,7 +60,7 @@ class ToolFileMessageTransformer:mimetype = meta.get("mime_type", "application/octet-stream")# get filename from meta- filename = meta.get("file_name", None)+ filename = meta.get("filename", None)# if message is str, encode it to bytesif not isinstance(message.message, ToolInvokeMessage.BlobMessage):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.tsxindex df2e03db2d8..51603480020 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@@ -32,6 +32,7 @@ const FileImageItem = ({}: FileImageItemProps) => {const { id, progress, base64Url, url, name } = fileconst [imagePreviewUrl, setImagePreviewUrl] = useState('')+ const download_url = url ? `${url}&as_attachment=true` : base64Urlreturn (<>@@ -84,7 +85,7 @@ const FileImageItem = ({className='absolute bottom-0.5 right-0.5 flex h-6 w-6 items-center justify-center rounded-lg bg-components-actionbar-bg shadow-md'onClick={(e) => {e.stopPropagation()- downloadFile(url || base64Url || '', name)+ downloadFile(download_url || '', name)}}><RiDownloadLine className='h-4 w-4 text-text-tertiary' />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.tsxindex a0984061608..667bf7cc153 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@@ -45,6 +45,7 @@ const FileItem = ({let tmp_preview_url = url || base64Urlif (!tmp_preview_url && file?.originalFile)tmp_preview_url = URL.createObjectURL(file.originalFile.slice()).toString()+ const download_url = url ? `${url}&as_attachment=true` : base64Urlreturn (<>@@ -93,13 +94,13 @@ const FileItem = ({}</div>{- showDownloadAction && tmp_preview_url && (+ showDownloadAction && download_url && (<ActionButtonsize='m'className='absolute -right-1 -top-1 hidden group-hover/file-item:flex'onClick={(e) => {e.stopPropagation()- downloadFile(tmp_preview_url || '', name)+ downloadFile(download_url || '', name)}}><RiDownloadLine className='h-3.5 w-3.5 text-text-tertiary' />