Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

⛔️ DEPRECATED. Use the `@anypoint-web-components/google` module instead.

License

Notifications You must be signed in to change notification settings

arc-archive/google-drive-browser

Repository files navigation

Deprecated

This component is deprecated. Use @advanced-rest-client/google instead.


A file browser for Google Drive.

Renders list view for Google Drive items that the application hosting the element has access to. The access is determined by accessToken generated for specific client id or by apiKey property. Learn more about access in Google Drive API docs.

Authorization

The element does not handle user authentication. The accessToken property has to be set on the element.

Listening for user actions

The element allows the user to pick and open a Google Drive item. When this happens the element downloads content of the file using the same access token and dispatches drive-file custom event. The event contains content and driveId properties.

document.querySelector('google-drive-browser').addEventListener('pick', (e) => {
  const driveId = e.detail;
  console.log(`Selected file: ${driveId}`);
});

Usage

Installation

npm install --save @advanced-rest-client/google-drive-browser

Development

git clone https://github.com/advanced-rest-client/google-drive-browser
cd google-drive-browser
npm install

Running the demo locally

npm start

Running the tests

npm test

About

⛔️ DEPRECATED. Use the `@anypoint-web-components/google` module instead.

Topics

Resources

License

Stars

Watchers

Forks