Hi everyone, I quote an example of the “curl” command to transfer a file from a remote host to a webdav nextcloud (upload only).
curl -T /tmp/myfile.txt -u 'JDzF3anjSQX2Ymm:' -H 'X-Requested-With: XMLHttpRequest' https: //myserver.neth.lan/nextcloud/public.php/webdav/
The -u option is the final part of sharing.
The command was tested by Ubuntu client, firewall pfsense, raspberry PI 3 with raspbian.
I hope it can come in handy.