Closed Nounours13 closed 1 year ago
Hi, On line 108 to 121 on elFinderVolumeGoogleDrive.class.php there is all options for Gdrive connection:
$opts = [ 'client_id' => '', 'client_secret' => '', 'access_token' => [], 'refresh_token' => '', 'serviceAccountConfigFile' => '', 'root' => 'My Drive', 'gdAlias' => '%s@GDrive', 'googleApiClient' => '', 'path' => '/', 'tmbPath' => '', 'separator' => '/', 'useGoogleTmb' => true, 'acceptedName' => '#.#', ....__
If I use :
roots = array( array( 'driver' => 'GoogleDrive', 'refresh_token' => '1//xxxxxx', 'client_id' => '513xxxxxxxxxxxxxxxxx', 'client_secret' => 'GOxxxxxxxxxxxxxxxxxx', 'path' => '/', 'root' => 'My GDrive' ); );_
all options are taken except client_id and client_secret
I must add :
define('ELFINDER_GOOGLEDRIVE_CLIENTID','513xxxxxxxx'); define('ELFINDER_GOOGLEDRIVE_CLIENTSECRET', 'GOCxxxxxxx');
otherwise i've an error : "Driver \"elFinderVolumeGoogleDrive\" : Required option \"client_id\" is undefined."
I don't understand why it doesn't work with the roots declaration because, in line 620 on elFinderVolumeGoogleDrive.class.php there are:
public function netmountPrepare($options) { if (empty($options['client_id']) && defined('ELFINDER_GOOGLEDRIVE_CLIENTID')) { $options['client_id'] = ELFINDER_GOOGLEDRIVE_CLIENTID; } if (empty($options['client_secret']) && defined('ELFINDER_GOOGLEDRIVE_CLIENTSECRET')) { $options['client_secret'] = ELFINDER_GOOGLEDRIVE_CLIENTSECRET; } if (empty($options['googleApiClient']) && defined('ELFINDER_GOOGLEDRIVE_GOOGLEAPICLIENT')) { $options['googleApiClient'] = ELFINDER_GOOGLEDRIVE_GOOGLEAPICLIENT; include_once $options['googleApiClient']; }
I don't know if it's me who made a mistake or if it's a bug. thank you for your reply.
Otherwise, using the define, it works fine.
This issue is stale because it has been open for 50 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hi, On line 108 to 121 on elFinderVolumeGoogleDrive.class.php there is all options for Gdrive connection:
If I use :
all options are taken except client_id and client_secret
I must add :
otherwise i've an error : "Driver \"elFinderVolumeGoogleDrive\" : Required option \"client_id\" is undefined."
I don't understand why it doesn't work with the roots declaration because, in line 620 on elFinderVolumeGoogleDrive.class.php there are:
I don't know if it's me who made a mistake or if it's a bug. thank you for your reply.
Otherwise, using the define, it works fine.