for my app, once a user draws something on a canvas, the canvas image should get stored to airtable.
since the image returned is in base64 format, airtable throws back an error( i tried with various field types but none worked)
also Cloudinary too doesnt accept this format pictures
so next my plan was to convert this base64format to url, but i wasnt able to find such APIs
so, is there any other way to store this picture in airtable ?
You can use
atob() to convert to and from base64 encoding.
There appears to be some confusion in the comments regarding what these functions accept/return, so…
btoa() accepts a “string” where each character represents an 8-bit byte – if you pass a string containing characters that can’t be represented in 8 bits, it will probably break. This isn’t a problem if you’re actually treating the string as a byte array, but if you’re trying to do something else then you’ll have to encode it first.
atob() returns a “string” where each character represents an 8-bit byte – that is, its value will be between
0xff. This does not mean it’s ASCII – presumably if you’re using this function at all, you expect to be working with binary data and not text.
Sorry, but I copied from stack overflow. you can post this image to through post message in thunkable and learn about this btoa() method and decode it
ok i get it but should i do it with an external scripter like google script ?
thanks for the method though
vs code studio is best editor and you must learn a bit of js ofcourse
but how to use it along with my thunkable app ? VS Code does not havea web api right ?