as247/flysystem-onedrive

One Drive Adapter for Flysystem

Installs: 43 767

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 1

Forks: 3

Open Issues: 0

pkg:composer/as247/flysystem-onedrive

v3.0.3 2024-05-30 14:40 UTC

This package is auto-updated.

Last update: 2025-09-29 01:59:33 UTC


README

Author Software License

Installation

composer require as247/flysystem-onedrive

Usage

  • Follow Azure Docs to obtain your ClientId, ClientSecret & TenantId
  • Follow OneDrive Docs to obtain your refreshToken
$token=new \As247\CloudStorages\Support\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 \As247\Flysystem\OneDrive\OneDriveAdapter($graph, '[root path]');

$filesystem = new \League\Flysystem\Filesystem($adapter);