PDF file gets downloaded instead of getting open in nextcloud even after enabling PDF viewer app
yes already tried in incognito mode as well
Does it happen for all PDF files, or just one specific file?
Unfortunately, I cannot help you further instead of basic suggestions like this (uninstall / reinstall or disable / enable the app etc). Since it works for everyone else, there must be something wrong with your configuration.
Is this a fresh install? How did you install Nextcloud?
Is there any additional app or setting needs to be enabled along with PDF viewer
@Pranjal Can you navigate to apps/files_pdfviewer/js
and post the output of ls -li
?
Maybe you have the same problem:
opened 02:29PM - 07 Nov 24 UTC
bug
0. Needs triage
### How to use GitHub
* Please use the 👍 [reaction](https://blog.github.com/201… 6-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are affected by the same issue.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.
---
### Steps to reproduce
1. Update Nextcloud to version [29.0.9](https://github.com/nextcloud/server/releases/tag/v29.0.9)
2. Open any PDF
### Expected behaviour
The PDF is displayed in the browser.
### Actual behaviour
The PDF is not displayed in the browser, only offered for download.
### Server configuration
**Web server:** Nginx
**Database:** MariaDB
**PHP version:** 8.2.2
**Nextcloud version:** 29.0.9
<details>
<summary>List of activated apps</summary>
```
$ php ~/www/occ app:list
Enabled:
- activity: 2.21.1
- cloud_federation_api: 1.12.0
- dav: 1.30.1
- federatedfilesharing: 1.19.0
- files: 2.1.1
- files_pdfviewer: 2.10.0
- files_sharing: 1.21.0
- files_trashbin: 1.19.0
- files_versions: 1.22.0
- groupfolders: 17.0.5
- impersonate: 1.16.0
- logreader: 2.14.0
- lookup_server_connector: 1.17.0
- notifications: 2.17.0
- oauth2: 1.17.1
- password_policy: 1.19.0
- previewgenerator: 5.6.0
- provisioning_api: 1.19.0
- richdocuments: 8.4.8
- serverinfo: 1.19.0
- settings: 1.12.0
- sharebymail: 1.19.0
- text: 3.10.1
- theming: 2.4.0
- twofactor_backupcodes: 1.18.0
- twofactor_totp: 11.0.0-dev
- viewer: 2.3.0
- workflowengine: 2.11.0
Disabled:
- admin_audit: 1.19.0
- bruteforcesettings: 2.9.0
- circles: 29.0.0-dev (installed 0.16.3)
- comments: 1.19.0 (installed 1.6.0)
- contactsinteraction: 1.10.0 (installed 1.0.0)
- dashboard: 7.9.0 (installed 7.0.0)
- encryption: 2.17.0
- federation: 1.19.0 (installed 1.6.0)
- files_downloadlimit: 2.0.0 (installed 2.0.0)
- files_external: 1.21.0 (installed 1.9.0)
- files_reminders: 1.2.0 (installed 1.0.0)
- firstrunwizard: 2.18.0 (installed 2.5.0)
- nextcloud_announcements: 1.18.0 (installed 1.4.0)
- photos: 2.5.0 (installed 2.0.1)
- privacy: 1.13.0 (installed 1.0.0)
- recommendations: 2.1.0 (installed 0.4.0)
- related_resources: 1.4.0 (installed 1.1.0-alpha1)
- support: 1.12.0 (installed 1.0.0)
- survey_client: 1.17.0 (installed 1.3.0)
- suspicious_login: 7.0.0
- systemtags: 1.19.0 (installed 1.6.0)
- updatenotification: 1.19.1 (installed 1.5.0)
- user_ldap: 1.20.0
- user_status: 1.9.0 (installed 1.0.1)
- weather_status: 1.9.0 (installed 1.0.0)
```
</details>
<details>
<summary>Nextcloud configuration</summary>
I can provide if necessary.
</details>
### Browser
**Browser name:** Firefox
**Browser version:** 132.0.1 (aarch64)
**Operating system:** macOS 14.7
thanks @mritzmann for your suggestion
files_pdfviewer-public.js is present in apps/files_pdfviewer/js directory
I got the issue, somehow viewer app (GitHub - nextcloud/viewer: 🖼 Simple file viewer with slideshow for media ) was not present in my /apps directory. After installing viewer app, PDF viewer app started working.
Hi, based on the posted log in Nextcloud 29.0.9: files_pdfviewer-public.js are missing · Issue #1080 · nextcloud/files_pdfviewer · GitHub , this looks like a jsresourceloader
app issue:
{
"reqId": "hisLNxFNFjl13wRNglUg",
"level": 3,
"time": "2024-11-07T13:59:13+00:00",
"remoteAddr": "**",
"user": "--",
"app": "jsresourceloader", <-- here is the app name
"method": "GET",
"url": "/index.php/s/**",
"message": "Could not find resource files_pdfviewer/js/files_pdfviewer-public.js to load",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0",
"version": "29.0.9.2",
"data": {
"app": "jsresourceloader"
}
}