laravel-filemanager
laravel-filemanager copied to clipboard
SymLinks are not supported
SymLinks throw: League \ Flysystem \ NotSupportedException Links are not supported, encountered link at (...)
when trying to display.
Version 2-alpha*5
Please provide more info like: disk
of file system, Laravel version, PHP version. And check all requirements are fulfilled from the installation document.
Sorry, assumed it was self-explaning. The steps to duplacte are simple, create a symlink (api is link(target, path) ):
target = real_path(disk/user_id_1) path = real_path(disk/user_id_2/link_user_1)
This will make it so user 1 folder is linked inside user 2 and he has shared access.
The problem is, in v2 this project is now using laravels apis to get the tree list instead of something like gblob
Sorry closed by mistake...
Use php link api to link user 1 to user 2 folders
Target= real_path(disk/1) Path = real_path(disk/2/user_1)
Then open the media manager for user 2, this will make it error.
I belive its because in v2 you're now using laravel's storage api which does this instead of something like glob. I've tried to fix it but i assume if ou fix it by replacing storage::disk()->getDirectories() by a recursive glob you might lose the cloud suuport stuff.
At this point i belive the best approch is to abstract that laravel api behind a custom function and a config flag. If the config flag for cloud suuport is enabled then you return the laravels code path otherwise return a recursive glob.
If you need some snippets let me know. Thanks for your work.
Thanks for the info. I will see how we can improve this.
+1 same issue
+1 No workaround found yet?
In my case it was the recursive Storage::disk()->allDirectories()
in a Laravel 8 application that caused problems with nested symlinks.
Using 'links' => 'skip',
in config/filesystems.php
for the affected disk solved it for me:
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'links' => 'skip', // 👍
],
]