Recently, while working on a plugin that moves attachments to Azure Blob Storage, the author encountered an exception related to a non-valid Base-64 string. The exception occurred when trying to decode a Base64 encoded string into its original byte array using the FromBase64ToString method. The author discovered that there were issues with the uploaded image, as even when trying to download it from the browser, they received the same exception. The solution was to check if the string is a valid Base64 encoded string before converting it to a byte array. If it is not valid, the author skipped processing that attachment and moved on to the next one.
Login now to access my digest by 365.Training