Images not showing on public shared folders on NC25

Images not showing on public shared folders

Since we updated to NC25, when a poto folder is shared publicly, its images arent displayed.

Not the miniature nor the image when clicking on it (message: (exclamation icon) Cant load “filename”

The server gets a 404 error in the preview such as: GET /index.php/apps/files_sharing/publicpreview/nWs83LcfjKcSBqm?file=/AMBIENTE0004.jpg&fileId=140597&x=5120&y=2880&a=true HTTP/2.0

:slightly_frowning_face:

Nextcloud version (eg, 20.0.5): 25.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04.6 LTS
Plesk Obsidian 18.0.47
PHP version (eg, 7.4): 8.0.25

The issue you are facing: Images not showing on public shared folders on NC25

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Generate a public link of a folder containing photos
  2. Open the link
  3. Try to view an image without downloading it.

The output of your Nextcloud log in Admin > Logging:
nothing… but the system log give us an 404:
PASTE HERE


The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

Nothing but hte system log give us a 404

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

404 GET /index.php/apps/files_sharing/publicpreview/nWs83LcfjKcSBqm?fileId=141224&file=%2FPTO%203190.gif&c=bee3b8293280e8fc09e332a338e61dfe&x=500&y=500 HTTP/2.0```

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Ok, what I tried:

  • updating the file_sharing to the github version (same problem)

Then I found out that the image is displayed under the URL /index.php/apps/files/
But not under /index.php/apps/files_sharing/publicpreview/xxxxx

Tried to create a nginx rule to simply redirect from one route to the other:

location ^~/index.php/apps/files_sharing/publicpreview {

return 301 /index.php/core/preview$request_uri$is_args$args;

}

BUT that route requires authentication so it only work if you are logged in.

Similar issue here with the same observations, but when sharing a photo album with a public link, then opened in a private browser.

Yes, thats exactly how I tested, also.

“good” to know more people have the same problem, that indicates its not about my installation… but also sorry you are facing this issue.

I’m having the same issue after upgrade from 24 to 25

Hi, turns out my installation is also affected since the update from 24 to 25.