1.0.3 • Published 4 years ago

@osjs/gdrive-adapter v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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