How can I disable the automatic opening of documents in shares with public links?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.03
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debia 13
  • Web server and version (e.g, Apache 2.4.25):
    • Apache
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Pound 4.2
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • after upgrade
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

When an external user opens a public link with an Office file or a PDF, Nextcloud automatically opens the editor instead of just showing the download page.
This started happening after upgrading from version 30 to version 32. How can I disable automatic editing?
The trick of adding /download to the URL does not work.

1 Like

Same problem here, I have to close the view before I can usr the shared link with the hidden cross at the top right corner:

I’m seeing the exact same behavior, and at this point it’s very clear what’s happening on the frontend:

  • Public share links now immediately open the Viewer overlay

  • The Viewer is opened with no valid file context

  • Result: infinite spinner / empty viewer

  • The underlying file list is there, but completely blocked by the overlay

This started very recently and lines up with multiple reports in the last ~12–24 hours.

Key points:

  • No server-side config changes

  • Happens across browsers and clients

  • Authenticated users are not affected

  • Only public (unauthenticated) shares

So effectively:

Public share links are currently broken — external users just get a spinner.

At this point I’m less interested in configuration toggles (there doesn’t appear to be one that helps) and more interested in:

  • Is this a known regression?

  • Is there an existing GitHub issue or PR tracking it?

  • Does anyone have a workaround, even a temporary one?

Right now, sending out a public link results in an unusable page for the recipient.

Issues with public shares seem to be caused by the Whiteboard app. Also see here: When Whiteboard is active, public shares don't work any longer · Issue #940 · nextcloud/whiteboard · GitHub

If you disable Whiteboard, public shares should work again.

1 Like

At Github a fix for the problem in the Whiteboard app was already announced, so you should be able to use it again soon.

1 Like

Thanks, it fixes the issue for me.

Confirming this fix — disabling the Whiteboard app resolved the spinning/blank public share issue for me. I had been chasing this for a bit and didn’t realize it was tied to Whiteboard. Thanks for calling it out, much appreciated!

Whiteboard 1.5.2 was just released and fixes this issue. So when you got this version installed, you can enable it again and public shares still work as expected.

Hi,
I don’t have whiteboard installed. Does anyone know if there is a way to disable the automatic document preview for public links?

Thanks
Carlos

As far I know, the automatic preview for single files can not be disabled. If there is a viewer registered for the MIME type of the file, it will be used.

Edit: at least direct download links work for me, when I add “/download”. In this case there is no viewer but the browsers will try to download the shared file.

Example with an image:

View: aranet4-inside.jpg - Nextcloud
Download: https://nextcloud.0x0c.de/s/dcirNeyw55kTsLZ/download

Example with a PDF:

View: demo.pdf - Nextcloud
Download: https://nextcloud.0x0c.de/s/oX6WLFFLNTC2Hpz/download

Hi awelzel,

the automatic preview that I’m talking about is the collabra view. When someone click on a public link, the Nextcloud automatic open the editor with the file. I just want to show the download page. The “/download” workaround does not work all the time

try this link :

Well - in my instance even docx files can be shared with a download option:

View: https://nextcloud.0x0c.de/s/QBm8xDSZFG4fEmm
Download: https://nextcloud.0x0c.de/s/QBm8xDSZFG4fEmm/download

I use Nextcloud 32.0.4 and Nextcloud Office 9.0.2 with Collabora 25.04.8.1 running in a Docker container.

Your link works with download as well - at least in my browser:

https://share.infarmed.pt/s/Rdo4GJ2Dpfdc3gQ/download

Did you try another browser, just to be sure?

I’ve already tried with several browsers and different operating systems. The problem affects external users accessing via public links.

In Nextcloud, without /download, it automatically opens Collabora to view the file — even for PDFs. The issue is that in some situations the /download URL returns an error.

If the share is an entire folder, it shows the download page.

All I can say is, that https://share.infarmed.pt/s/Rdo4GJ2Dpfdc3gQ/download works for me every time I try it. I have no idea, why it fails sometimes. In such cases you should also check the browser developer console if there are any JavaScript errors.

Yes, that’s the workaround we use, although I don’t understand why it sometimes fails. But the original problem remains: is it possible to disable the automatic Collabora preview every time a public link to a document is opened?

No, it isn’t.

You may post a feature request at Github. Maybe the developers can implement an optional “switch off” - Collabora preview.