I'm trying to create an image in Sharepoint based on the Base64 encoded data which I have received in JSON format.
This Base64 comes in as:
data:image/png;base64,iVBORw0KGgoAAAANSUh...
If I use DecodeBase64ToBinary on this, I get the error
The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'.
However, if I remove
data:image/png;base64,
from the start of the data, it works fine.
I thought this was needed as part of the Base64 data? It would be a pain if I have to remove it in order to decode it.