My javascript frontend is sending the base64 encoded string:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAADkCAIAAACwiOf9AAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nO...`
I need to get just the base64 data, that means the iVBORw0KGgoAAAANSUhEUgAAAM8AAADkCAIAAACwiOf9AAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nO...
. Basically the data:image/png;base64,
needs to be removed. Is there some standard python library that I can use to perform this operation, or must I roll my own regexes?
The base64 library just offers support for encoding/decoding, which is not what I need: I want to keep the base64
encoded data, just without the prefix.