Send file to Nextcloud using command line

The following command will send a file to Nextcloud using the linux command line.

curl -u USERNAME:PASSWORD -T /path/to/file https://my.nextcloud.com/remote.php/dav/files/USERNAME/