โ07-16-2021 07:16 AM
Hi,
Iโm getting an encoded test from SNS which can decode base64 using online tool but
when I use โBase64.decode($content)โ in map iโm getting below error, can someone please help
Failure: Unable to decode base64 value, Reason: Bad Base64 input character decimal 123 in array position 0, Resolution: Make sure the argument is valid base64
Thanks,
DK
โ07-16-2021 08:09 AM
Can you post the Base64 content (assuming it is not sensitive!)?
โ07-17-2021 05:41 AM
Hi Deepak,
Quick question, has the $content object has already been encoded to base64 (usually needs to encode since content is a binary)
Try, Base64.decode(Base64.encode($content))
Thanks
โ07-17-2021 07:18 AM
Thanks, It worked ๐
โ07-19-2021 10:31 AM
Note: This is equivalent to $content
. Also, our preview UI sometimes erroneously shows binary content as โBase64-encodedโ when itโs actually not. Itโs just an array of bytes. See Convert Base64 to HEX - #5 by ptaylor