-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF viewer not working with shared links #1063
Comments
Hi, I can confirm that I have the same bug on my side. I think the problem is that it returns an HTTP 401 when the preview script tries to fetch the PDF. I noticed a 401 error on this kind of links : https://redacted-server.com/public.php/dav/files/3mQSWszDagxCo7p/ Edit : I'm also on Nextcloud V30 Edit 2 : However, the download of the file works fine, no 401 on this. |
Also affected. If I disable both PDF Viewer and Built-in Collabora Server (but not remove them), then at least somehow Nextcloud Office still finds the Builtin Collabora in apps, and generates a preview. It's ugly but it's something. I think this is also related and it's where I got the idea from; https://help.nextcloud.com/t/pdf-files-wont-open/188277/9 |
Possibly related: #946 |
I think I have the same issues on MP3 files. The mp3 player does not show up and I have the same 401 errors (but I can still download the file). So it may be a broader issue with the previewing of all public/shared files. EDIT: Similar error with mp4 file. But images & .md files previews are working. |
I tracked down where the 401 is coming from. apps/dav/appinfo/v2/publicremote.php , starting at line 78. if ($federatedShareProvider->isOutgoingServer2serverShareEnabled() === false && !$isAjax) { I tested by comment out the throw line and I was able to view the PDF as expected. Noticing isOutgoingServer2serverShareEnabled , I took a look in Administration settings -> Sharing -> Federate Cloud Sharing and noticed this setting which was off. Turning it on (with the throw back in the above code) also fixes the issue. Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares) . |
Thanks @boutilpj, from what I managed to find, it seems to be fixed in a recent commit bbc5d32c8e14de78ae12c3acea384c69d2264eca in this pull request 48628 |
Thanks @madrzejewski and indeed Nextcloud update to 30.0.1 fixed it. |
Closing then 👍 |
How to use GitHub
Steps to reproduce
Expected behaviour
Tell us what should happen
Normaly it you should see the PDF
Actual behaviour
Tell us what happens instead, if possible also add a screenshot
When I open the PDF a black screen appears
Server configuration
Database: MySQL/Maria/SQLite/PostgreSQL
MariaDB
Nextcloud version: (see Nextcloud admin page)
30.0.0
List of activated apps
Auditing / Logging Brute-force settings External storage support File sharing Files download limit Nextcloud webhook support Password policy Share by mail PDF Viewer 3.0.0Nextcloud configuration
Browser
Browser name: Firefox/Chrome/Safari/…
In every Browser it doesnt work
Browser version: 124/125/…
Operating system: Windows/Ubuntu/Mac/…
Windows
Browser log
Browser Console
I use docker and there the Nextcloud container:
https://hub.docker.com/layers/library/nextcloud/30.0.0/images/sha256-0f19a49f4169d4622128f73b8b84110dccd8d7b6c925e1cc54860914be549e89?context=explore
Not working:
Working (If iam logged in):
The text was updated successfully, but these errors were encountered: