You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Richard Scott (Jira)" <ji...@apache.org> on 2026/08/22 01:09:00 UTC
[jira] [Created] (NIFI-16243) New processor to detect if content is Base64 encoded
Richard Scott created NIFI-16243:
------------------------------------
Summary: New processor to detect if content is Base64 encoded
Key: NIFI-16243
URL: https://issues.apache.org/jira/browse/NIFI-16243
Project: Apache NiFi
Issue Type: Improvement
Reporter: Richard Scott
*Problem*
There is currently no lightweight way in NiFi to determine whether a FlowFile's content is Base64 encoded. The only existing approach is to attempt an actual decode and treat failure as "not Base64." This is unreliable: some non-Base64 content decodes without error, while other legitimate content triggers a decode failure that doesn't reliably indicate the content isn't Base64. In practice this produces frequent false failures in flows that simply need to check content type before deciding how to handle it.
*Proposed Solution*
Introduce a new processor that inspects FlowFile content and identifies whether it is Base64 encoded, without performing an actual decode.
* The result is written to a FlowFile attribute as {{true}} or {{{}false{}}}. The attribute name should be configurable rather than fixed.
* The scope of the check should be configurable: either a sample of the content (with a configurable sample size, for faster checks on large files) or the entire content, streamed rather than fully buffered, for cases requiring certainty.
* The FlowFile should always route to {{success}} regardless of the result, since this processor is meant for detection only. Downstream flows can branch on the attribute using {{{}RouteOnAttribute{}}}.
*Benefit*
This would give flow designers a reliable, low-cost way to identify Base64 content up front, removing the false failures caused by using decode attempts as a detection mechanism.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)