I am trying to upload a file to webserver using cURL, -H headers are are used to provide the details of the content, there are three parameters that I have to pass.
below is the raw header
--data-raw ^"--myBoundry^
Content-Disposition: form-data; name="App" ^
execute=location/in/the/server/^
--myBoundry^
Content-Disposition: form-data;name="file";filename="**foo.csv**"^
Content-Type: text/csv^
^
^
--myBoundry^
Content-Disposition: forma-data;name="directory"^
^/upload/location/"^
--myBoundry--^
^"
I can see the file in the server, but the size is always 0.
I wonder where curl is expecting foo.csv to be, the same location where we run the curl script from or somewhere else.
have already tried @/full/local/path/foo.csv, but the result was the same.
New to cURL, would help if someone could point me in the right direction.
Tried giving the full path to the local file, that did not work.
Sidharth Bhatt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2