Base64

Discover more about the Base64 component and how to use it on the Digibee Integration Platform.

Base64 encodes and decodes from/to fields, payload, and files in base64 string format.

Parameters

Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB).

ParameterDescriptionDefault valueData Type

Operation

Defines the operation to be performed: Encode Fields, Encode Payload, Encode File, Decode Fields, Decode Payload, and Decode File.

Encode Fields

String

JSON Fields

JSON path to be encoded or decoded. The fields must be separated by a comma (for example: field1,field2). This option is valid for the Encode Fields and Decode Fields operations only.

fields.field1

String

Preserve Original

If this option is activated, the original fields are preserved, and the prefixes are changed by adding the underline character (_).

False

Boolean

Payload (DB)

Field to directly inform the payload that will have its content encoded/decoded (for example: body, data, {{ message.payload }}). This option is valid for the Encode Payload and Decode Payload operations only.

N/A

String

Result As File

If this option is activated, the result of the encoding or decoding is saved in a file. This option is valid for the Encode Payload and Decode Payload operations only.

False

Boolean

File Name (DB)

Name or full file path (for example, tmp/processed/file.txt) of the file to be compressed.

N/A

String

Output File Name (DB)

Name of the output file after a file is encoded/decoded. This option is valid for the Encode File and Decode File operations only.

N/A

String

Is Binary

If this option is activated, the payload is expected as a binary file. This option is valid for the Decode Payload operation.

False

Boolean

Fail On Error

If the option is activated, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the "success" property.

False

Boolean

The File Name and Output File Name fields must receive different values. If the values are the same, an error will be produced (an exception).

Messages flow

Input

For the Encode Fields and Decode Fields operations, the component expects to receive a JSON containing the fields configured in the JSON Fields property.

Example

Configuration:

JSON Field = field1,field2

The expected JSON must at least have:

{   
   "field1": "SOMETHING",   
   "field2": "SOMETHING"
}

For the Encode Payload and Decode Payload operations, you must configure the Payload field to encode/decode.

Example

Configuration:

Payload = {{ message.field1 }}

The expected JSON must at least have:

{   
   "field1": "SOMETHING"
}

For the Encode File and Decode File operations, you must configure the file that will be encoded/decoded and the resulting file of this operation.

Example

File Name = input.csv
Output File Name = outputfile.csv

Output

For the Encode Fields and Decode Fields operations:

{
   "field1": "SOMETHING ENCODED/DECODED",
   "field2": "SOMETHING ENCODED/DECODED",
   "_field1": "ORIGINAL VALUE",
   "_field2": "ORIGINAL VALUE",
}

For the Encode Fields and Decode Fields operations, if the input message is preserved:

{
   "field1": "SOMETHING ENCODED/DECODED",
   "field2": "SOMETHING ENCODED/DECODED",
   "_field1": "ORIGINAL VALUE",
   "_field2": "ORIGINAL VALUE",
}

For the Encode Payload and Decode Payload operations, if the output is a file:

{
   "success": "true",
   "fileName": "file.csv"
}

For the Encode Payload and Decode Payload operations, if the output is a string:

{
   "success": "true",
   "result": "SOMETHING ENCODED/DECODED"
}

For the Encode File and Decode File operations:

{
   "success": "true",
   "fileName": "file.csv",
   "outputFileName": "file.csv"
}

Last updated