tdale
September 27, 2017, 7:52pm
1
Hello,
We have all of our share links password protected however we are looking to be able to download them using a program sometimes like wget. How can i build the url with the share and the password to get the file directly using a program like wget.
Thanks,
Tom
tflidd
September 28, 2017, 10:36pm
2
Like this? Wget compatible share link with nautilus
this could be helpful as well
https://docs.nextcloud.com/server/12/user_manual/files/access_webdav.html#accessing-files-using-curl
Uploading works:
I managed to succeed in uploading files through my own custom script by adding the “X-Request-With” header. This makes the final curl command something like:
curl -k -T testfile.txt -u "AtAxVrKorgC5YJf:" -H 'X-Requested-With: XMLHttpRequest' https://nextcloud.example.com/public.php/webdav/testfile.txt
-u is the parameter for the “Authorization: Basic” header where the username is the final part of the share link created by nextcloud. This makes sure the file gets uploaded to the correct direct…
1 Like