mirror of
https://github.com/apache/nifi.git
synced 2025-02-06 18:18:27 +00:00
NIFI-12536: This closes #8178. Used proper method for converting byte array to String
Signed-off-by: Joseph Witt <joewitt@apache.org>
This commit is contained in:
parent
1f54d5d1fc
commit
2897618635
@ -177,7 +177,7 @@ class ParseDocument(FlowFileTransform):
|
||||
|
||||
input_format = context.getProperty(self.INPUT_FORMAT).evaluateAttributeExpressions(flowFile).getValue()
|
||||
if input_format == PLAIN_TEXT:
|
||||
return [Document(page_content=str(flowFile.getContentsAsBytes()), metadata=metadata)]
|
||||
return [Document(page_content=flowFile.getContentsAsBytes().decode('utf-8'), metadata=metadata)]
|
||||
|
||||
element_strategy = context.getProperty(self.ELEMENT_STRATEGY).getValue()
|
||||
if element_strategy == SINGLE_DOCUMENT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user