Bae64 decoding
Syntax
$input.base64Decode()
Description
Decodes the Base64 encoded string and returns the corresponding binary data.
Parameters
Name | Type | Description | Mandatory | Default |
---|---|---|---|---|
input | String | Base64 encoded content | yes | - |
name | string | name of the file to create | no | "data |
contentType | String | Content-Type of the file to be created | no | Is inferred from the name, e.g. "text/plain" for "*.txt". |
Return value
Type: Binary data
The binary value extracted from the Base64 encoding.
Example
"TWVpbiBUZXh0".base64Decode(name: "file.txt")
Output: A text file with content "My Text".