nextcloud / files_pdfviewer

:book: A PDF viewer for Nextcloud
GNU Affero General Public License v3.0
91 stars 43 forks source link

[Nextcloud 31] Public share not correctly detected #1047

Open susnux opened 2 months ago

susnux commented 2 months ago

With Nextcloud 31 also the public share frontend is migrated to the files Vue UI. This app seems to work, but there is an error in the console:

Files_PDFViewer: But this does not appear to be a public page

Maybe you can use this for public share detection: https://nextcloud-libraries.github.io/nextcloud-sharing/functions/public.isPublicShare.html

Steps to reproduce

  1. Use master branch (Nextcloud 31)
  2. Create a public share with a PDF file
  3. Open public share and browser dev tools

Expected behaviour

No error in console.

Actual behaviour

[ERROR] Files_PDFViewer: But this does not appear to be a public page 
Object { app: "Files_PDFViewer", level: 0 }
index.mjs:54:16
    log index.mjs:54
    error index.mjs:72
    <anonymous> public.js:76
    (Async: EventListener.handleEvent)
    <anonymous> public.js:13
    <anonymous> files_pdfviewer-public.js:1
    <anonymous> files_pdfviewer-public.js:1

Server configuration

PHP version: 8.3

Nextcloud version: 31

Where did you install Nextcloud from: Git