Open lauhub opened 7 years ago
I submitted a PR that would allow you to do that, by enabling it in your config.php with
$config->allow_symlinks_outside_photos_dir = true;
Once it is accepted and merged, you can update to the latest code to get the needed changes to allow this. Or, you can look at the changes I made in my commit, and make the same changes in your PhotoShow files.
Context
I have a folder which receives all my photos from an external source:
/rootdir/photos
. This folder contains all photos without any organization. As it is a synchronization folder, it is not possible to re-organize the photos directly inside it with subfolders.I need to organize photos by months: all photos taken in october will be put in (e.g.) a
2016-10
folder.I don't want to duplicate my photos (I got several tens of GB of them) so the nice to do this with Linux is to use symbolic links (symlinks).
So I create a
/rootdir/photosbymonths/2016-10
folder and create a link from this folder to the image in /rootdir/photos. Here is an example of what I can see in myrootdir/photosbymonths/2016-10
folder:I use Debian Wheezy with an NGINX and PHP-FPM server.
The problem
As soon as I create the symlink, I got the following error when I browse my site:
This file is not inside the photos folder !
This exception is raised from line 183 of my
src/classes/File.php
file.If I remove the symlink, the error disappears.
Question
Is there a way to use symlinks for this kind of use case ? Is there a configuration item to modify ?