dkvhin / flysystem-onedrive
One Drive Adapter for Flysystem
v11.2.3
2024-08-05 00:49 UTC
Requires
- php: >=8.2
- ext-json: *
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^10.0|^11.0
- league/flysystem: ^3.0
- microsoft/microsoft-graph: ^1.110
This package is auto-updated.
Last update: 2024-12-05 02:16:53 UTC
README
Installation
composer require dkvhin/flysystem-onedrive
Usage
- Follow Azure Docs to obtain your
ClientId, ClientSecret & TenantId
- Follow OneDrive Docs to obtain your
refreshToken
$token=new \Dkvhin\Flysystem\OneDrive\OneDriveOauth(); $token->setClientId('[Client ID]'); $token->setTenantId('[Tenant ID]'); $token->setClientSecret('[Client secret]'); $token->setRefreshToken('[Refresh token]'); $graph = new \Microsoft\Graph\Graph(); $graph->setAccessToken($token->getAccessToken()); $adapter = new \Dkvhin\Flysystem\OneDrive\OneDriveAdapter($graph, '[root path]'); $filesystem = new \League\Flysystem\Filesystem($adapter);