Hi,
I'm currently pulling down a Base64 string from an API and converting the string into a file.
$Base64 = [Convert]::FromBase64String($Data)
[IO.File]::WriteAllBytes($File, $Data)
This has worked great but I recently came across a string that I couldn't convert and got the below error.
Unable to process Base64 string Exception calling "FromBase64String" with "1" argument(s): "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character
among the padding characters
. "
How do you go about troubleshooting this? When I plug the string into an online converter it doesn't give me any errors. The string doesn't have any header information.
Thanks