nextcloud / nextcloud/server

downloadURL- why absolute link

Open
#35,942 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: sharing needs review
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Is your feature request related to a problem? Please describe.
If you expose your Nextcloud over multiple networks (in-house network (one dns), internet access (different dns)) then downloading won't work (download files shared over direct link). Nextcloud is only aware of the in-house name, but he isn't aware of the internet-access dns and for them he renders the in-house address. That link is not accessible from the internet and download fails.

Describe the solution you'd like
Relative links for direct downloading files.

Additional context
https://github.com/nextcloud/server/blob/8f7996fb1bc08ba9845435c79808b02d5927d369/apps/files_sharing/lib/Controller/ShareController.php#L464-L467

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/files_sharing/lib/Controller/ShareController.php around lines 464-467, where the direct-download URL is referenced. Trace how that URL is assembled and identify the relevant existing tests or entry points before changing it. Done means direct-download links are relative and remain usable when the server is accessed through different network names.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.