Can't open files types jpg,pdf, online it downloads instead.

  • Nextcloud Server version (e.g., 29.x.x):
    Nextcloud Hub 9 (30.0.5)
  • Operating system and version (e.g., Ubuntu 24.04):
    Debian 12
  • Web server and version (e.g, Apache 2.4.25):
    Server version: Apache/2.4.63 (Debian)
    Server built: 2025-02-06T13:06:45
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    nginx version: nginx/1.27.4
  • PHP version (e.g, 8.3):
    8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    yes
  • When did this problem seem to first start?
    1st time when trying to view pdf, images
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    web installer
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    Hestia cp

Summary of the issue you are facing:

i am unable to view documents online.
if i click on any file type jpg,pdf, it downloads the file instead of viewing in browser.

Steps to replicate it (hint: details matter!):

  1. navigate to folders click on pdf file , it downloads the file.
  2. i check and pdf viewer is enable .
  3. i am able to see the preview image but i can’t open them

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

PASTE HERE

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

Please fill out the log sections, particularly the Web Browser one from the support template. It will likely give you clues about what is going on.

Has it ever worked before?

Hi Sanook,

no it has never worked. is a brand new install.

Then the MIME types in the web server are probably not correct.

how can i check if mine types in the web server are correct?

It probably depends on how you have installed your web server. I would do some research in this direction and google for “MIME Types Apache” or something similar.

There should be a admin overview warning about needing to update mimetype cache or w/e its called, if the fault is at the nc side (and not some separately defined mimetypes declaration.

It might be worth to check if previews are enabled for the file-type, I have a vague memory of that being needed for viewing but I might be completely wrong…