No groups in Images From Library Selector
Field type of Image.
Trying to get image From Library - can't view files grouped by directories. I see only one group named files
Details
| Question | Answer |
|---|---|
| Relevant Bolt Version | 5.1.10 |
| Install type | Composer install |
Take a look to response of async/list_files?location=files&type=images on Bolt 5.0.6 for ex.

we can see the 'root group' and the 'business group' (corresponding business directory)
and the same response on Bolt 5.1.10

the 'files group' in all entries
As I see, the reason is in vendor\bolt\core\src\Utils\FilesIndex.php where we set group for each file
'group' => basename($basePath)
I Can't understand yet why we pass the same value ($basePath) for all files entries...
I'm not sure why/how this snuck in, but I've noticed this too. For Bolt 5.2 this is getting reworked, and it'll be easier to pick out images: https://github.com/bolt/core/pull/3227
I am also interested in an improvement of the library files selector in 5.2.
My app is in 5.1 for the moment and I needed to override the FileIndex to set the group property this way :
group' => dirname($file->getRelativePathname())
The selector is still less user friendly than it was in the previous version of my app (Bolt v3) but it can make the job temporarly.