mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
fix: trim file extension
This commit is contained in:
@ -102,7 +102,7 @@ class ToolNode(BaseNode):
|
||||
filename = response.save_as or url.split('/')[-1]
|
||||
|
||||
# get tool file id
|
||||
tool_file_id = url.split('/')[-1]
|
||||
tool_file_id = url.split('/')[-1].split('.')[0]
|
||||
result.append(FileVar(
|
||||
tenant_id=self.tenant_id,
|
||||
type=FileType.IMAGE,
|
||||
@ -114,7 +114,7 @@ class ToolNode(BaseNode):
|
||||
))
|
||||
elif response.type == ToolInvokeMessage.MessageType.BLOB:
|
||||
# get tool file id
|
||||
tool_file_id = response.message.split('/')[-1]
|
||||
tool_file_id = response.message.split('/')[-1].split('.')[0]
|
||||
result.append(FileVar(
|
||||
tenant_id=self.tenant_id,
|
||||
type=FileType.IMAGE,
|
||||
|
||||
Reference in New Issue
Block a user