Base64 Encode
The Base64 Encode task encodes the content of a file into the Base64 format. This process transforms binary data (such as that of an image, a PDF, or any other file) into a textual representation, commonly used to transmit data in contexts that support only text, such as within an XML or JSON file.
Configuration
This is the operational tab of the task. Here, you define which file must undergo the encoding process.
File to Import
In this field, you must specify the source file whose content will be converted into a Base64 string.
File path insertion can occur in several ways:
Direct Path: You can manually type the absolute file path into the text field.
Selection via Parameter: By clicking the button (☰), the menu "Parameter List**" opens. This allows you to dynamically select the file to be processed.
- From the menu, you can directly drag available parameters into the File to Import field. Parameters are organised by category (e.g.,
Runtime parameters,Workflow parameters, etc.).- It is essential to choose a parameter that ends with the suffix
.file(for example,prova.file). This type of parameter contains the correct reference to the file path, for example, generated by a previous task in the workflow.- When a parameter is dragged into the field, it will be inserted with special syntax, such as
#>prova.file<#. This instructs the task not to use the literal text, but to dynamically resolve the value of the variableprova.fileat execution time.
Once executed, the task will read the content of the specified file and produce the corresponding Base64 string as output, which can be used in subsequent tasks of the workflow.
Output Parameters
Upon completion of execution, the Base64 Encode task exposes a series of output parameters that can be used in subsequent tasks of the diagram:
- result: Indicates the outcome of the operation, for example: "File Encoded Correctly".
- resultJson: Represents the result of the task execution in JSON format, including general information, configurations, and execution details.
- base64: The Base64 string derived from the input file.