Base64 canvas export seems corrupted

Hi,

I am trying to upload my canvas’ base64 string to my server.

I can get the string uploaded no problem, and it appears to be a proper base64 string
e.g.:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABdwAAAJYCAYAAAB4syQkAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3Q3UlVWdKPAt30ggiKIYwWuaNqXw..........<Omitted middle section too long>..................BCmgr8P9wxlSeRO0LRwAAAABJRU5ErkJggg==

But when I try to open the base64 image using it seems to be a corrupt image.

The Base64 string generated by thunkable canvas seems to be so much longer than other base64 strings I generate using php etc. It also contains lots of whitespaces which base64 doesnt usually contain from memory?

Has anyone experienced this before? Is there something I need to do to convert this on server side? is it a non standard Base64 image?

PS: I’ve tried many iterations of blocks etc. Including wrapping it in a JSON object.

thanks

2 Likes

When I save the canvas using the Image block and assign it to a text input , it generates a long base64 string… in my case… 76,690 characters long! But there weren’t any spaces. I don’t know how that compares to other base64 image strings but it sounds like it’s really, really long.

However, I was able to view the canvas image by pasting the string into this site: Base64 to Image Decoder / Converter.

I then converted an image on my computer using a different site and it generated a string that was 12,427 characters long.

Hopefully someone else has a bit more knowledge about this topic…

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.