Goal: I have a column with image column type. When I upload image to that column I want it to be stored in google cloud storage. For this I need image data in Base64 format. How can I get this?
I am storing it the Postgres database that I am using as a ultimate destination for all the data coming in from retool app. I have set up GCS bucket and resource on retool as well. when I am trying to upload an image , for testing purpose I am inserting image as a string in postgres but that string looks like "https://myorg.retool.com/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0V.." . So the image is not in base64 format here. I guess if somehow I could transform this into base64 then eventually I will be able to upload these screenshots to GCS bucket.
How can I get or transform image in Base64 format?