Skip to content

Commit ed5cc3a

Browse files
committed
fix: update file handling in base_document_extract_node.py to use image metadata
--bug=1058385 --user=刘瑞斌 【应用】文档内容提取节点提取文档失败 https://www.tapd.cn/62980211/s/1727581
1 parent 9d2fd05 commit ed5cc3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def save_image(image_list):
6161
'application_id': str(application.id) if application.id else None,
6262
'file_id': str(image.id)
6363
}
64-
file = bytes_to_uploaded_file(image.image, image.image_name)
64+
f = bytes_to_uploaded_file(image.meta['content'], image.file_name)
6565
FileSerializer(data={
66-
'file': file,
66+
'file': f,
6767
'meta': meta,
6868
'source_id': meta['application_id'],
6969
'source_type': FileSourceType.APPLICATION.value

0 commit comments

Comments
 (0)