Skip to content

Commit 9534247

Browse files
committed
fix: extract content from image meta before uploading file
1 parent c78c2b3 commit 9534247

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def save_image(image_list):
6161
'application_id': str(application.id) if application.id else None,
6262
'file_id': str(image.id)
6363
}
64-
f = bytes_to_uploaded_file(image.meta['content'], image.file_name)
64+
file_bytes = image.meta.pop('content')
65+
f = bytes_to_uploaded_file(file_bytes, image.file_name)
6566
FileSerializer(data={
6667
'file': f,
6768
'meta': meta,

0 commit comments

Comments
 (0)