[solved] Downloading a (single) file with wget

Hello,

I have created a link to share to a single file stored in NC; when I enter this link in any webbrowser I get a WebUI that allows me to download this shared file.

Now I want to download this shared file using wget.
However, the file type is HTML document, Unicode text, UTF-8 text, with very long lines (5536)

Can you please advise how to download the shared file ivpn.tar.gz correctly with wget?

THX

Nextcloud version (eg, 20.0.5): 23.0.8
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): nginx 1.22
PHP version (eg, 7.4): 8.0.22

1 Like

I’m not sure about wget, but files with public share links can be downloaded with curl.

https://docs.nextcloud.com/server/latest/user_manual/en/files/access_webdav.html#accessing-files-using-curl

When you do this with a share link, the username is the share token (random part of the URL) and the password is the password set on the share link.

curl -u sharetoken:sharepwd -o filename “https://my.domain.com/public.php/webdav/filename”

1 Like