# Base64 canvas export seems corrupted

**URL:** https://community.thunkable.com/t/base64-canvas-export-seems-corrupted/2035085
**Category:** Questions about Thunkable X
**Created:** [September 9, 2022, 9:27pm UTC](https://community.thunkable.com/t/base64-canvas-export-seems-corrupted/2035085 "2022-09-09T21:27:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chay](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@chay](https://community.thunkable.com/u/chay)
#### Post date: [September 9, 2022, 9:27pm UTC](https://community.thunkable.com/t/base64-canvas-export-seems-corrupted/2035085/1 "2022-09-09T21:27:26Z")

</div>

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

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [September 9, 2022, 11:09pm UTC](https://community.thunkable.com/t/base64-canvas-export-seems-corrupted/2035085/2 "2022-09-09T23:09:02Z")

</div>

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](https://codebeautify.org/base64-to-image-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…

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [December 8, 2022, 11:09pm UTC](https://community.thunkable.com/t/base64-canvas-export-seems-corrupted/2035085/3 "2022-12-08T23:09:55Z")

</div>

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