nextcloud_share_url_downloader icon indicating copy to clipboard operation
nextcloud_share_url_downloader copied to clipboard

downloading single file

Open JochemBoersma opened this issue 3 years ago • 2 comments

First of all: many thanks for this tool. Very useful for large data transfers!

When the download link directs towards a single file, it won't download, since it is build for folders, isn't it? To test this, i've made a document on my own Nextcloud instance, called: testfile-for-issue.txt

The share link: https://nextcloud.metjedata.nl/s/MXYzWBnYMTttkPA password: wEjjNEYD68

I've made a single-shot workaround by commenting lines 285-288 (and 291) and changing line 290 into:

download_file_from_nextcloud_share "${nextcloud_host_url}/public.php/webdav${nextcloud_file_or_dir_name}" hoppakee.txt;

which results in a hoppakee.txt file in the current working directory of the client.

Would be nice if this can be generalized, but I haven't that much bash-experience.

JochemBoersma avatar Dec 02 '21 10:12 JochemBoersma

As you noticed, for now only directory shares are supported as that is how the NextCloud share links I get, are.

I didn't use it myself, but it is possible that the following supports it (It supports at least more than just donwloading): https://github.com/Nucleomics-VIB/cloud-dl

ghuls avatar Dec 02 '21 11:12 ghuls

Thanks for quick response. I will take a look, but for now I'll use my own dirty quick fix.

JochemBoersma avatar Dec 02 '21 15:12 JochemBoersma