Error message using extension HttpClient.PostForm

Hello,
I am trying to use extension HttpClient to post a file. I always have an errormessage from httpClient : no value for filetopost whatever I put in value for filetopost
Here are the blocks of my app.


Does anyone have an idea about the reason for this error ?

FilePicker returns a contenturi and not a filepath ? Does httpclient extension handle contenturis ?

Don't know. It's the first time I use this extension. I will look at that.
thanks for this idea.

I have tested with fullpath and always the same error. no value for filetopost
I have added a test before posting to check that file exists and It give me the following response:
File: file:///storage/emulated/0/Documents/participants.csv exits.
So I dont know what is expected in filetopost variable

Try removing the file:// prefix

Still the same error after removing file://

My guess is, your app does not own that file? Where does it cone from?

Try to use the filepicker and convert the uri to the path to the file for the httpclient extension

Taifun

It doesn't change anything. same error ??
What's wrong ?.

I don't know if it can help do debug, but when I try to check that the file exits afeter picking it, i get a runtime error message

here are my blocks with check tests

You are not converting the contenturi

For ease, use this extension

I have put a copy of the file in the directory of aicompanion3 and when I make do it on the variable , I see that the path is correct. So I really don't know why it doesn't work.

Again remove the file:// prefix

Also, are you sure you do not need any headers or fields ?

Same error No value for filetopost

As already mentioned earlier

  1. use the filepicker
  2. convert the content uri into a path to the file, how to do it use
  1. use that path to send it using the httpclient extension

as test to find out if you are able to access the file after step 1 and 2 use the file component to read it

show us all relevant blocks for 1, 2 and 3
and don't hesitate do use Do it to debug your blocks

Taifun

Ok I will try that later since I have no more time available now (9pm in France). Thanks a lot for your help

Have you tested your file upload method with either an html form or curl command (Postman) ?

Yes the file has been uploaded without problem.

Here are the results of my test. Alaways No value for filetopost. Moreover when I use the file component to read it I have Error 2101

As you can see, the file exists on my phone in Documents directory

Your File Read from won't work unless you set the correct filescope.

Show the method and syntax for your successful upload.

Provide a link for the API requirements of the site you are uploading to.

Again I ask that you are certain you do not need any headers or fields in your URL?