BinaryContentTransformer
Captures the document's original, unparsed content and stores it, Base64-encoded, in a metadata field.
Notes
This is meant for consumers that need access to the raw document bytes after parsing has taken place (parsing normally discards the original content), such as a committer uploading the original file content rather than the extracted text.
Must be used as a pre-parse handler: the document is still in its original format at that point. Using it post-parse raises an error since the original content is no longer available by then.
Examples
The following example captures the original document content into a field named "binaryContent".
- YAML
- JSON
- XML
handler:
class: BinaryContentTransformer
{
"handler": {
"class": "BinaryContentTransformer"
}
}
<handler>
<class>BinaryContentTransformer</class>
</handler>
Usage
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: BinaryContentTransformer
fieldName: string
label: string
{
"class": "BinaryContentTransformer",
"fieldName": "string",
"label": "string"
}
<handler>
<class>BinaryContentTransformer</class>
<fieldName>string</fieldName>
<label>string</label>
</handler>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
fieldName | string | No | binaryContent |
label | string | No | - |
Property Details
fieldName
Name of the metadata field to store the Base64-encoded content in. Default is "binaryContent".
label
An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing — it exists purely to help identify this step, for example in large configurations or in the visual configurator.