Skip to content

os-js/osjs-gdrive-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS.js Logo

OS.js is an open-source web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.

Support Support Donate Donate Community

OS.js Google Drive VFS Adapter

This is the Google Drive VFS (Client) Adapter for OS.js.

This is not done and might damage your files!

Installation

npm install @osjs/gdrive-adapter @osjs/gapi-provider

Usage

Requires @osjs/gapi-provider set up with the following configuration (see separate docs):

client: {
  discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/drive/v3/rest'],
  scope: ['https://www.googleapis.com/auth/drive']
}

In your client initialization script:

import gdriveAdapter from '@osjs/gdrive-adapter';

osjs.register(VFSServiceProvider, {
  depends: ['osjs/gapi'],
  args: {
    adapters: {
      gdrive: gdriveAdapter
    }
  }
});

Then create a mountpoint:

{
  vfs: {
    mountpoints: [{
      name: 'gdrive',
      label: 'Google Drive',
      adapter: 'gdrive'
     }]
   }
}

Contribution

Documentation

See the Official Manuals for articles, tutorials and guides.

Links