After some test, I've discovered that the problem is that you can't get file contents greater than 4KBytes.
Then I have other problem: I don't know how to use a file as payload for /tool fetch http-method=put
Did anyone ever present a solution to this? I would like to upload a backup file to webserver (running nextcloud) using the put method. How can this be done?
A method using curl works like this (both examples with the variables defined beforehand of course):
curl -s -u ${user}:${pass} -T ${filedir}/${file} "${baseurl}/remote.php/dav/files/${user}/${savepath}/${file}"
I've tried something like this:
/tool fetch address=$address host=$address mode=https http-method=put src-path=( "$file" . ".backup" ) dst-path=( "$savepath" . "/" . "$file" . ".backup" ) user="$user" password="$pass";
(I also tried with the src-path more like the dst-path.) While it does connect, it uploads/creates a zero-byte file. How can I attach the backup file to upload it?
TIA!