Too long string posting with web (or send image to web(api))

Hello,
I converted an image to base64 string and want to send that string to a webpage in this format:
"ww w.j ustawebsite .co m/mybase64string"
but I am getting 414 too long url error.
Do you have a solution or an advice?

what I am trying to do is send an image captured by app to my server. if we can send directly(without converting base64) I am ok with that too.

How does the server receive the string, by php?

"ww w.j ustawebsite .co m/mybase64string"
like this

Use POST instead of GET
or
Resize image before encoding, then use POST instead of GET

Does sending a small image work?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

I have a python code to do image processing operations. I will implement this code to my server and get photos from my users then process that photos and send result to my users. I found this solution but sending photo as base64 gives 414 too long error.
I searched to execute python codes in app and found puravidaapss/skulpt.html but coud not execute it because it can not find skulpt.html

No point processing the image at the upload end, the base64 code will still be too long. You need to reduce the image size, which will reduce the length of the base64 string

You forgot to tell us

You have to upload that html file into the assets of your app. . Try the example project ..

Taifun

example project do not working for me. Its already uploaded in assets.

I am trying to post data. if I post 2 numbers with html, it works.
If I post 2 numbers with app inventor, it does not work.
Here is my html code:

and here is my appinventor code block:


(I tried to send numbers as numbers instead of string but did not work too.)

finally found the problem for summing 2 numbers: just add buildrequestdata

Now I will try for looong loong strings :slight_smile:

yes i can finally send base64 data.
Thank you for your help.

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