I'm using Python Flask as my backend and faced a little problem. In the frontend application I have a form that contains an image upload feature.
In the backend I refer a variable to the image with
image = request.files['image']
That exports a FileStorage
object.
I want to convert the image to base64 format in order to insert it to my DB. I tried a lot of things but nothing worked. Anyone knows?