I would use cURL like described in the documentation:
curl -u USERNAME:PASSWORD -T /path/to/file https://my.nextcloud.com/remote.php/dav/files/USERNAME/
I would use cURL like described in the documentation:
curl -u USERNAME:PASSWORD -T /path/to/file https://my.nextcloud.com/remote.php/dav/files/USERNAME/