HI,
so i'm kind of new on app inventor and I don't understand why my HTTP POST request doesn't work.
So there are the screens of what i'm trying to do with this request. In the future I would like to send an html code as a texte but even a single word doesn't work.
Ok sorry but now I have another question.At first I was thinking about replacing the text by all the html of a page wich will be read by the python program. But because the python program itself read a file and not a text, I tried to ask chatgpt to do it but apparently it make the server crash.
So my question is: How can I instand of a Text send a File? Because the thing is that when I tried (during so much time) i can't send the file in the web request because of a weird file path.
In the above I have an example html file in my media folder (assets), and use the File component to get the correct path (works for companion app and compiled app). We remove the file:// prefix to create the absolute path required by the PostFile block.
So I tried to do what you tell but like i don't know why it just doesn't work. I tried everything I could but no. It was not the main subject of this conversation so if you don't want to help anymore I can understand
@Joejsanz - could you have a look at what your extension actually does? Seems it does not handle the more obtuse contenturis, only the ones that actually contain a file path of sorts.
Another solution: use the SAF extension (credits @vknow360), copy the picked file to a folder in your ASD, then get the filepath for that and POST it to your server.
So I recreate exactly what you did but when I choose the file nothing happed at all. Like the first bloc is working perfectly for choosing the file but then nothing.