cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to decode base64 value

deepak_shaw
Contributor

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

4 REPLIES 4

nravon
New Contributor

Can you post the Base64 content (assuming it is not sensitive!)?

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

Thanks, It worked 😀

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