Download in Photos app returns 404 – DAV path duplicated when Nextcloud runs in subfolder /nextcloud

Downloading a photo from the Photos app fails with “Could not be downloaded – No file”. The same file downloads fine from the Files app (file list and viewer).

Environment

  • Nextcloud 32.0.5.0 (Arch Linux package)
  • Photos 5.0.0-dev.1
  • Installed in subfolder: https://HOST/nextcloud/
  • Webserver: apache, no proxy
  • overwritewebroot: not set
  • overwrite.cli.url: https://HOST/nextcloud/
  • htaccess.RewriteBase: /nextcloud/
  • Reproducible in Firefox and Edge

Steps to reproduce

  1. Open the Photos app.
  2. Open any photo.
  3. Click “Download”.

Expected: File is downloaded.

Actual: Request goes to a URL with the DAV root duplicated and returns 404:

GET /nextcloud/remote.php/dav/nextcloud/remote.php/dav/files/USER/Photos/2026/09/IMG.jpg
→ 404 (Sabre\DAV\Exception\NotFound: File not found: nextcloud in 'root')

Additional findings

  • Correct URL works (HEAD /nextcloud/remote.php/dav/files/USER/Photos/2026/09/IMG.jpg → 200).
  • PROPFIND returns correct hrefs (/nextcloud/remote.php/dav/files/USER/...).
  • Files app download works for the same file.
  • Disabling/enabling Photos and a hard reload did not help.

Suspected cause: The Photos app prepends the DAV root URL (incl. webroot) to a path that already contains it, which only shows up with a non-empty webroot.

I have since upgraded to the latest nextcloud 35.0.1-1, photos 8.0.0, but the problem remains

I have had this issue for a while now. Exactly as you describe. I have seen other references when doing various web searches but haven’t seen any solutions.

Edit: Looks like there is a recent bug report for the Photos app here [Bug]: Download in Photos app returns 404 – DAV path duplicated when Nextcloud runs in subfolder /nextcloud · Issue #3972 · nextcloud/photos · GitHub

Edit 2: Oh wait, that was you!