Page 1 of 1

SLP improvement: 404 in file manager

Posted: Mon Mar 23, 2020 12:21 pm
by stereomaton
Observed in version 0.2.3 of SLP
Using the "File manager" icon on the webpage, the "open" link of a file detail page points to the wrong URL.
The preview of a JPG has broken source URL as well.

To reproduce: take a photo, use the file manager to navigate to /media/DCIM/<photoname>, click on open link (or observe the preview)

Possible correction (not highly tested):
Line 1231 of /var/www/html/files/index.php
replace

Code: Select all

    $file_url = FM_ROOT_URL . fm_convert_win((FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $file);
by

Code: Select all

    $file_url = FM_ROOT_URL . '/rootfs/' . fm_convert_win((FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $file);
and add a symlink 'rootfs' in /var/www/html pointing to /

Re: SLP improvement: 404 in file manager

Posted: Mon Mar 23, 2020 1:03 pm
by Realizator
Hi Stereomaton!
Thank you for this report!
I've opened a new thread about planned SLP update here: https://forum.stereopi.com/viewtopic.php?f=10&t=896