Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Nextcloud : PDF does not load correctly if opened from shared folder

    Nextcloud
    2
    6
    968
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jagan last edited by

      In the NextCloud, a folder can be shared by generating a link.
      Once the shared link is opened, the entire contents of the folder is displayed.
      Expected Behavior: When a PDF in the shared folder is opened, it opens a preview of the PDF.
      Actual Behavior: If a PDF is opened in a shared folder, the PDF is not displayed. Instead, an error is displayed as follows:

      Invalid or corrupted PDF file. 
      PDF.js v2.4.456 (build: 228a591c)
      Message: Invalid PDF structure.
      

      How to replicate the bug.

      1. Create a folder in NextCloud and upload some PDF files to the folder.
      2. Share the folder by generating a share link (which is automatically copied to the clipboard)
      3. Open the folder using the share link (in an incognito tab of a browser)
      4. Once the folder is opened and the list of contents of files displayed, click on any PDF to open.
      5. The PDF will load in a preview mode, but instead of displaying the PDF, throw an error stating, 'invalid or corrupted PDF'.

      Notes: If the PDF file is shared by generating a link and if the PDF is opened with this link, it loads correctly.
      Only when the PDF is opened from the shared folder, the PDF does not load/open correctly.

      This bug is only in the recent update (Nextcloud 20.0.7). It was not there in the previous versions.

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Thanks for the elaborate description, I guess that would be good reported upstream. There seems to be a few related issues already, maybe one of them is yours?

        https://github.com/nextcloud/server/issues/25117
        https://github.com/nextcloud/files_pdfviewer/issues/286

        J 1 Reply Last reply Reply Quote 1
        • J
          jagan @nebulon last edited by

          @nebulon said in Nextcloud : PDF does not load correctly if opened from shared folder:

          Thanks for the elaborate description, I guess that would be good reported upstream. There seems to be a few related issues already, maybe one of them is yours?

          https://github.com/nextcloud/server/issues/25117
          https://github.com/nextcloud/files_pdfviewer/issues/286

          Thanks, @nebulon, https://github.com/nextcloud/files_pdfviewer/issues/286 matches the issue I am facing, I will follow that thread.

          1 Reply Last reply Reply Quote 1
          • nebulon
            nebulon Staff last edited by

            Looks like this was fixed upstream in that plugin https://github.com/nextcloud/files_pdfviewer/pull/319

            Can someone verify that it works now after updating that plugin in Nextcloud?

            J 2 Replies Last reply Reply Quote 1
            • J
              jagan @nebulon last edited by

              @nebulon It is said the fix will come with the next stable update.

              if you use Nextcloud in production, just wait for the next stable release that may come soon.

              So, seems we have no option but to wait for the next release.

              1 Reply Last reply Reply Quote 0
              • J
                jagan @nebulon last edited by jagan

                @nebulon

                The bug has been fixed in the current updated 20.0.8 version of cloudron!

                Thanks for a delightful experience.

                Edit: This thread can be marked solved I think.

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post
                Powered by NodeBB