Image To Base64 Not Working At All

I tried using Image to Base64 Extension - #7 by Sivagiri_Visakan - ClassicExtensions - Community and [Free] Base 64 extension. File to/from Base 64 - Extensions - MIT App Inventor Community
but none of this is working for converting the JPGs image to base64 and sending to the web app.

I tried to fetch the files encode in the email using the webapp but it is also unable to send file encoded. I think their is some problem from encoder extension side.
Plz anyone help me i am new to ai2 and kodular.

References used:
https://groups.google.com/g/mitappinventortest/c/jW7cvVkfgCk

Extensions removed by Mod

Please show all your relevant blocks and your script.

You can use a Do It to check whether the image has been converted to a base64String.

Also confirm that you have correctly published your script.

@TimAi2 yeah i have published my script.

which relevant blocks u need, i think i have given the most relevant block to my problem?

You do not show how your are converting the image to base64 string, whether this is being returned as a base64 string. Your Posttext blocks do not look anything like the ones in the guide, you appear to be doing something different. Hence also need to see your script. Check each of your variables in posttext to ensure it is correct.

oh, i will tell you correctly what i am doing , i am basically updating the excel sheet with text and using this, one post api for text is working fine and for image it is working fine when tested with postman tester but in kodular it isnt giving same results and the main problem that why it doesnt give me result is that i dont think the encoder is actually encoding my image.

i also dont know how to check if its encoding or not because when i say it to text that to a textbox the app gets crashed.

@TimAi2 please tell me if u need to know anything further

btw i am testing the app using companion

After picking an image, you can check for encoding like this in companion:

image

You should also check that all of this is correct:

image

and matches with the parameters required by the google apps script (which you still have not shared)

If you are trying to set the base64 string to the content of a cell in google sheets, you only have 50,000 characters to play with. A 500kb image file is likely to have more characters than that.

I removed the extension that you posted because only the developer can upload an aix. Next time please post a link to developer’s topic or site like I did

nah ,i am not trying to put the string to content of a cell rather than i am inserting it using spreadsheet.insertImage() function all my variables are correct so far i have tested for all variable but only var file is unable to access.

Lemme just check for check for encoding in companion as u suggested and tell u result.

i tried that but i am not getting anything like the question mark in your image on companion screen.
block

can u share the extension if u have it , there might be a possibility that i may be using some upgraded version of library which is causing issue.

It is quite an old extension, I do not believe it has been changed or upgraded:

i used this extension only and but still not getting the “?” in companion or the base64 string

if u think it is not upgraded and might be not working then what other solution u know to convert the image base64 in kodular platform.

Did you right click on the block and select Do it ?

Tested on Kodular, works just fine:

image

yeah but not getting any result.
i am using 500kB jpg images,i dont think they are too much big

Unfortunately, I am not a mind reader. If you do not share what you are doing, blocks, script, setup, I have no way of knowing where your issue lies.

To use Do it, your app must be connected to your companion, and you can then right click on the EncodeImage block and select Do It - AFTER you have selected an image with the imagepicker.

i just created a second project and used it to just get block results , u check if i am doing something wrong.
test.aia (30.1 KB)
u just try this your side none of this works for my selected file

Not setting image to image component but happily converting to base64

image