PHPackages                             luketowers/oc-gdrivefilesystemdriver-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. luketowers/oc-gdrivefilesystemdriver-plugin

Abandoned → [winter/wn-drivergoogledrive-plugin](/?search=winter%2Fwn-drivergoogledrive-plugin)ArchivedOctober-plugin[File &amp; Storage](/categories/file-storage)

luketowers/oc-gdrivefilesystemdriver-plugin
===========================================

Provides the Google Drive Filesystem Driver for OctoberCMS

v1.0.1(8y ago)61.1k3MITPHP

Since Apr 11Pushed 2y ago5 watchersCompare

[ Source](https://github.com/LukeTowers/oc-gdrivefilesystemdriver-plugin)[ Packagist](https://packagist.org/packages/luketowers/oc-gdrivefilesystemdriver-plugin)[ Docs](https://github.com/LukeTowers/oc-gdrivefilesystemdriver-plugin)[ RSS](/packages/luketowers-oc-gdrivefilesystemdriver-plugin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Use  instead.

About
=====

[](#about)

October-fied implementation of the [Google Drive Flysystem Driver](https://github.com/nao-pon/flysystem-google-drive).

Important Note:
===============

[](#important-note)

Google Drive is an ID-based filesystem; it supports having multiple files with the same name within a given directory. This driver exposes the file and directory IDs when requesting filenames which means if you hooked it up the the Media manager to view your files you would see something like the picture below:

[![Google Drive IDs instead of filenames](https://user-images.githubusercontent.com/7253840/38589679-b2e45652-3ce9-11e8-94cf-e0f1f3d4890a.png)](https://user-images.githubusercontent.com/7253840/38589679-b2e45652-3ce9-11e8-94cf-e0f1f3d4890a.png)

Installation
============

[](#installation)

To install from the [Marketplace](https://octobercms.com/plugin/luketowers-gdrivefilesystemdriver), click on the "Add to Project" button and then select the project you wish to add it to before updating the project to pull in the plugin.

To install from the backend, go to **Settings -&gt; Updates &amp; Plugins -&gt; Install Plugins** and then search for `LukeTowers.GDriveFileSystemDriver`.

To install from [the repository](https://github.com/luketowers/oc-gdrivefilesystemdriver-plugin), clone it into **plugins/luketowers/gdrivefilesystemdriver** and then run `composer update` from your project root in order to pull in the dependencies.

To install it with Composer, run `composer require luketowers/oc-gdrivefilesystemdriver-plugin` from your project root.

Configuration
=============

[](#configuration)

Example Storage disk configuration using the `googledrive` storage driver provided by this plugin:

```
'mygoogledrive' => [
    'driver' => 'googledrive',
    'clientId' => '',
    'clientSecret' => '',
    'refreshToken' => '',

    // Null for the route folder, otherwise a folder ID to base the driver off of
    'folderId' => null,
],

```

See the Configuration Guides at the bottom for how to get the values for `clientId`, `clientSecret`, `refreshToken`, &amp; `folderId`.

Usage
=====

[](#usage)

For usage examples of interacting with this driver see the usage examples here: [ivanvermeyen/laravel-google-drive-demo#available-routes](https://github.com/ivanvermeyen/laravel-google-drive-demo#available-routes)

Configuration Guides
====================

[](#configuration-guides)

Getting your Client ID and Secret
---------------------------------

[](#getting-your-client-id-and-secret)

Log in to your Google Account and go to this website:

### Create a Project

[](#create-a-project)

Create a new project using the dropdown at the top.

[![Create a new project](https://cloud.githubusercontent.com/assets/3598622/22397261/060eac9e-e56e-11e6-907c-717932605569.png)](https://cloud.githubusercontent.com/assets/3598622/22397261/060eac9e-e56e-11e6-907c-717932605569.png)

After you enter a name, it takes a few seconds before the project is successfully created on the server.

### Enable Drive API

[](#enable-drive-api)

Make sure you have the project selected at the top.

Then go to Library and click on "Drive API" under "G Suite APIs".

[![Add Drive API](https://user-images.githubusercontent.com/3598622/28462245-a13b3d9c-6e1a-11e7-8cf8-0082ac8a9141.png)](https://user-images.githubusercontent.com/3598622/28462245-a13b3d9c-6e1a-11e7-8cf8-0082ac8a9141.png)

And then Enable it.

[![Enable Google Drive API](https://cloud.githubusercontent.com/assets/3598622/22397290/a858c6d8-e56e-11e6-9154-0052d7ecd0eb.png)](https://cloud.githubusercontent.com/assets/3598622/22397290/a858c6d8-e56e-11e6-9154-0052d7ecd0eb.png)

### Create Credentials

[](#create-credentials)

Go to "Credentials" and click on the tab "OAuth Consent Screen". Fill in a "Product name shown to users" and Save it. Don't worry about the other fields.

[![Consent Screen](https://cloud.githubusercontent.com/assets/3598622/22397326/549fb3c0-e56f-11e6-9b0a-8771b0ba72b4.png)](https://cloud.githubusercontent.com/assets/3598622/22397326/549fb3c0-e56f-11e6-9b0a-8771b0ba72b4.png)

Then go back to Credentials, click the button that says "Create Credentials" and select "OAuth Client ID".

[![Create Credentials](https://cloud.githubusercontent.com/assets/3598622/22397368/33f8bd0a-e570-11e6-859c-34d112c772e4.png)](https://cloud.githubusercontent.com/assets/3598622/22397368/33f8bd0a-e570-11e6-859c-34d112c772e4.png)

Choose "Web Application" and give it a name.

Add  in "Authorized redirect URIs". You will need to use this in the next step to get your refresh token. Once you have the token, you can remove the URI.

[![Credentials](https://user-images.githubusercontent.com/3598622/28473452-e675826c-6e44-11e7-8ff0-bea423b0cff7.png)](https://user-images.githubusercontent.com/3598622/28473452-e675826c-6e44-11e7-8ff0-bea423b0cff7.png)

Click Create and take note of your **Client ID** and **Client Secret**.

Getting your Refresh Token
--------------------------

[](#getting-your-refresh-token)

Go to .

> Make sure you added this URL to your Authorized redirect URIs in the [previous step](1-getting-your-dlient-id-and-secret.md).

In the top right corner, click the settings icon, check "Use your own OAuth credentials" and paste your Client ID and Client Secret.

[![Use your own OAuth credentials](https://cloud.githubusercontent.com/assets/3598622/22397216/24fe7d88-e56d-11e6-82cf-2d75365d8800.png)](https://cloud.githubusercontent.com/assets/3598622/22397216/24fe7d88-e56d-11e6-82cf-2d75365d8800.png)

In step 1 on the left, scroll to "Drive API v3", expand it and check the first drive scope.

[![Check Scopes](https://user-images.githubusercontent.com/3598622/28462312-fa4397ea-6e1a-11e7-93ad-365b891052a6.png)](https://user-images.githubusercontent.com/3598622/28462312-fa4397ea-6e1a-11e7-93ad-365b891052a6.png)

Click "Authorize APIs" and allow access to your account when prompted. There will be a few warning prompts, just proceed.

When you get to step 2, check "Auto-refresh the token before it expires" and click "Exchange authorization code for tokens".

[![Exchange authorization code for tokens](https://cloud.githubusercontent.com/assets/3598622/22397183/8472095c-e56c-11e6-85be-83adf00837c7.png)](https://cloud.githubusercontent.com/assets/3598622/22397183/8472095c-e56c-11e6-85be-83adf00837c7.png)

When you get to step 3, click on step 2 again and you should see your **refresh token**.

[![Refresh Token](https://cloud.githubusercontent.com/assets/3598622/22397176/2cef7a98-e56c-11e6-83b9-b4653850dbca.png)](https://cloud.githubusercontent.com/assets/3598622/22397176/2cef7a98-e56c-11e6-83b9-b4653850dbca.png)

Getting your Root Folder ID
---------------------------

[](#getting-your-root-folder-id)

If you want to store files in your Google Drive root directory, then the folder ID can be `null`. Else go into your Drive and create a folder.

Because Google Drive allows duplicate names, it identifies each file and folder with a unique ID. If you open your folder, you will see the **Folder ID** in the URL.

[![Folder ID](https://cloud.githubusercontent.com/assets/3598622/22397170/d79422ba-e56b-11e6-8ba6-01c622fdef42.png)](https://cloud.githubusercontent.com/assets/3598622/22397170/d79422ba-e56b-11e6-8ba6-01c622fdef42.png)

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2950d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7253840?v=4)[Luke Towers](/maintainers/LukeTowers)[@LukeTowers](https://github.com/LukeTowers)

---

Top Contributors

[![LukeTowers](https://avatars.githubusercontent.com/u/7253840?v=4)](https://github.com/LukeTowers "LukeTowers (8 commits)")

---

Tags

filesystemlaraveldrivergoogle-driveoctoberoctobercmsGDrive

### Embed Badge

![Health badge](/badges/luketowers-oc-gdrivefilesystemdriver-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/luketowers-oc-gdrivefilesystemdriver-plugin/health.svg)](https://phpackages.com/packages/luketowers-oc-gdrivefilesystemdriver-plugin)
```

###  Alternatives

[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2631.7M14](/packages/masbug-flysystem-google-drive-ext)[sausin/laravel-ovh

OVH Object Storage driver for laravel

40153.5k](/packages/sausin-laravel-ovh)[oneduo/nova-file-manager

A handy file manager tool for Laravel Nova

157350.3k2](/packages/oneduo-nova-file-manager)[yoelpc4/laravel-cloudinary

Laravel Cloudinary filesystem cloud driver.

3343.0k](/packages/yoelpc4-laravel-cloudinary)[private-it/flysystem-google-drive

FlySystem adapter for Google Drive (work with path)

207.8k](/packages/private-it-flysystem-google-drive)[janvince/smallcontactform

Simple but flexible multi language contact form builder with custom fields, validation and passive antispam

307.4k](/packages/janvince-smallcontactform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
