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