Direct Download

Hi,

I’m not sure to be opening this topic in the correct category. Apologizes if it’s the case.

So, I’m trying to do something on owncloud.

When a file is shared using a public URL, there is a button to copy the URL to the clipboard which gives you something like this when you paste it: https://your-owncloud.com/index.php/s/2CZ23SZNDa5esXO

Only when you visit the page, there is another button to the direct URL which adds /download to the end of that URL: https://your-owncloud.com/index.php/s/2CZ23SZNDa5esXO/download

I have searched for solutions to avoid that unnecessary step and to get that Direct URL when clicking at the clipboard button. Or to avoid adding it manually.

So, I have been searching the code and found out that <?php p($_['downloadURL']); ?> does this (giving you the direct URL to download the file). I’m not sure if it’s that simple. I suppose it would just be a matter of replacing whatever the clipboard is using.

If it’s that simple, does anyone know where do I find this code to replace?

If it’s not that simple, any suggestions? Sharing a folder with a bunch of files it’s not a solution at all for this particular use case. :slight_smile:

I would appreciate a lot if anyone could help me on this.

Is this a generally unnecessary step or just for your use case?

Which version are you using? My 2.4.1 has several options including copy link to clipboard (direct download).

Thank you for your reply.

@hodyroff In this case, the website interface is used; not the web client.

@dmitry I don’t know any other use cases but for this one, in particular, it’s unnecessary. :slight_smile:

That’s what I was thinking :slight_smile:

Everyone’s use case is different, what may seem unnecessary to you is a great way to do things for some one else.

As for your specific question, where to find the code to change, I don’t know. I would suppose that kind of question could be answered on the github site for ownCloud

@dmitry Ok, thanks. I have opened an issue here: https://github.com/owncloud/core/issues/31649

Thinking about sharing a big file (some GBs) it is rather better distribute the link to the public page where the actual download can be explicitly be triggered.

I vote for not changing this behavior

@DeepDiver1975 You misunderstood my post. I didn’t ask to change this behavior nor requested a new feature. :slight_smile:

However, since you mention it, it would be nice to have both available to cover all use cases. +1