Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneDrive mount atomatically #2121

Closed
alsantos123 opened this issue Aug 2, 2017 · 4 comments
Closed

OneDrive mount atomatically #2121

alsantos123 opened this issue Aug 2, 2017 · 4 comments

Comments

@alsantos123
Copy link

alsantos123 commented Aug 2, 2017

It's possible, after the first authorization, get mt OneDrive netdrive mount automatically? and specify the directory inside my onedrive to mount?

I really need specify, through my php connector, what directory, inside my OndeDrive, I want to be mounted.

Cheers.

@nao-pon
Copy link
Member

nao-pon commented Aug 3, 2017

@alsantos123 To do that you need to get an access token.

e.g

array(
	'driver' => 'OneDrive',
	'path' => '/', // or folder ID (not path)
	'accessToken' => '{"expires":1501753851,"data":{"token_type":"bearer","expires_in":3600,"scope":"wl.skydrive_update wl.offline_access","access_token":"xxxxxxxxxx"}}',
),

@nao-pon
Copy link
Member

nao-pon commented Aug 3, 2017

You can find access token in the debug tab of the help dialog with debug mode (in connector configuration).

170803-233820

@alsantos123
Copy link
Author

Thanks nao-pon! =)

@nao-pon nao-pon closed this as completed Aug 5, 2017
@applibs
Copy link

applibs commented Feb 2, 2019

I got error:
Driver "elFinderVolumeOneDrive" : Root folder does not exist.
with this config:

if($onedriveDB) {
    define('ELFINDER_ONEDRIVE_CLIENTID', $onedrive['consumerKey']);
    define('ELFINDER_ONEDRIVE_CLIENTSECRET', $onedrive['consumerSecret']);
    $opts['roots'][] = array(
        'driver'        => 'OneDrive',
        'path'          => '/',
        'quarantine'    => $quarantinefiles,
        'tmpPath'       => $tmpfiles,
        'tmbPath'       => $tmbfiles,
        'tmbURL'        => $tmburl,
        'tmbCrop'       => false,
        'tmbSize'       => 150,
        'alias'         => 'OneDrive',
        'tmbBgColor'    => 'transparent',
        'client_id'     => $onedrive['consumerKey'],
        'client_secret' => $onedrive['consumerSecret'],
        'accessToken'   => '{"expires":'.$onedrive['expiry'].',"data":{"token_type":"bearer","expires_in":3600,"scope":"onedrive.readwrite offline_access","access_token":"'.$onedrive['accessToken'].'", "refresh_token":"'.$onedrive['refresh_token'].'"}}',
        //'app_key'           => $onedrive['consumerKey'],
        //'app_secret'        => $onedrive['consumerSecret'],
        //'access_token'      => $onedrive['accessToken'],//must be
        //'accessTokenSecret' => $onedriveDB['accessTokenSecret'],
        'URL'           => $url,
    );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants