Skip to content

Commit

Permalink
feat(document_extractor): support tool file in document extractor (la…
Browse files Browse the repository at this point in the history
  • Loading branch information
laipz8200 authored and JunXu01 committed Nov 9, 2024
1 parent 450d1ae commit b3816f1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/core/workflow/nodes/document_extractor/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,8 @@ def _download_file_content(file: File) -> bytes:
response = ssrf_proxy.get(file.remote_url)
response.raise_for_status()
return response.content
elif file.transfer_method == FileTransferMethod.LOCAL_FILE:
return file_manager.download(file)
else:
raise ValueError(f"Unsupported transfer method: {file.transfer_method}")
return file_manager.download(file)
except Exception as e:
raise FileDownloadError(f"Error downloading file: {str(e)}") from e

Expand Down

0 comments on commit b3816f1

Please sign in to comment.