Actions49
- Base64 Actions
- Binary Actions
- Encoding Actions
- Format Actions
- HTML Actions
- String Actions
Base64 → Binary to Base64
AI-generatedOverview
The node provides data conversion capabilities between various formats, focusing here on the Base64 resource with the Binary to Base64 operation. This specific operation converts binary data from a specified binary property into a Base64-encoded string.
This is useful in scenarios where binary files (images, documents, etc.) need to be encoded as Base64 strings for embedding in text-based formats such as JSON, XML, or HTML, or for transmission over protocols that only support text.
Practical examples:
- Encoding an image file's binary content to Base64 to embed it directly into an HTML or CSS file.
- Converting binary attachments in emails to Base64 for safe transport.
- Preparing binary data for APIs that require Base64-encoded payloads.
Properties
| Name | Meaning |
|---|---|
| Binary Property | The name of the binary property in the input data that contains the binary data to convert. Default is "data". |
| Binary Property Name | (Optional) The name for the output binary property if outputting binary data instead of JSON. Default is "data". |
Output
- The output JSON contains a field named
resultwhich holds the Base64-encoded string representation of the binary data. - If configured to output binary data (
outputBinaryoption), the node outputs the converted data as binary under the specified output binary property name. - No other fields are added by default unless the Base64 string represents structured data (not applicable here).
Dependencies
- No external services or API keys are required.
- The node relies on internal helper methods to access and convert binary data buffers.
- No special environment variables or credentials are needed for this operation.
Troubleshooting
Common issues:
- Specifying a binary property name that does not exist in the input data will cause an error.
- Input binary data must be valid; corrupted or empty binary data may result in invalid Base64 output or errors.
Error messages:
- Errors related to missing binary data typically indicate the binary property name is incorrect or the input item lacks binary data.
- Conversion errors might occur if the binary buffer cannot be read properly.
Resolutions:
- Verify the binary property name matches exactly the property in the incoming data.
- Ensure the input data contains valid binary content before conversion.
- Use the "Continue On Fail" option to handle errors gracefully during batch processing.