Elfinder: Feature: Add driver id prefix to connector option

Created on 19 Apr 2017  路  4Comments  路  Source: Studio-42/elFinder

elfinder.html#elf_l1_XA //default is 'elf_' + l +' _...'

Sometimes a plugin will change the prefix:
elfinder.html#elf_fls1_XA // changed to fls by e,g Barryvdh flysystem

class Driver extends elFinderVolumeDriver
{
     protected $driverId = 'fls';

What would be great is an id_prefix

            $opts = array( 
                'driver'         => 'LocalFilesystem',
                'id'               => generated(),
                'id_prefix'    => 'fls', //or back to  'l' //feature
feature

All 4 comments

Right now, I succeeded in doing this. Maybe this is the correct way, and this is not a feature or issue at all.

class elFinderVolumeFlysystem extends \Barryvdh\elFinderFlysystemDriver\Driver {
    protected $driverId = 'l';
}

In case anyone is wondering, this is the use scenario:
startPathHash: 'l' + myVol + '_' + btoa(myFolder).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '.').replace(/\.+$/, '')) : '',

@donShakespeare OK. I'll make an option driverId so that it can be specified more easily.

Done, Thanks! 馃憤

Works perfectly! Thanks.

Was this page helpful?
0 / 5 - 0 ratings