Skip to main content

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".

handler:
class: BinaryContentTransformer

Usage

Full configuration skeleton, with every option and its default
class: BinaryContentTransformer
fieldName: string
label: string

Properties

PropertyTypeRequiredDefault
fieldNamestringNobinaryContent
labelstringNo-

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.