Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frycz/google-drive-upload
:outbox_tray: Easily build applications allowing users to upload text to Google Drive as Docs files
https://github.com/frycz/google-drive-upload
async-await es7 gapi google-drive rollup
Last synced: 9 days ago
JSON representation
:outbox_tray: Easily build applications allowing users to upload text to Google Drive as Docs files
- Host: GitHub
- URL: https://github.com/frycz/google-drive-upload
- Owner: frycz
- License: mit
- Created: 2018-08-06T17:43:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T05:39:32.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T00:36:36.622Z (16 days ago)
- Topics: async-await, es7, gapi, google-drive, rollup
- Language: JavaScript
- Homepage:
- Size: 732 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Google Drive Upload
[![GitHub license](https://img.shields.io/github/license/frycz/google-drive-upload.svg)](https://github.com/frycz/google-drive-upload/blob/master/LICENSE.md)
[![Package Control total downloads](https://img.shields.io/npm/dt/google-drive-upload.svg)](https://www.npmjs.com/package/google-drive-upload)
[![npm](https://img.shields.io/npm/v/google-drive-upload)](https://www.npmjs.com/package/google-drive-upload)
[![Website shields.io](https://img.shields.io/website-up-down-green-red/https/frycz.github.io/google-drive-upload.svg)](https://frycz.github.io/google-drive-upload/)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg?style=flat)](https://github.com/frycz/google-drive-upload/pulls)Easily build applications allowing users to upload text to Google Drive as Docs files.
## Demo
- Go to [https://quicknote-91c7d.firebaseapp.com/](https://quicknote-91c7d.firebaseapp.com/)
- Login with your Google account
- Create a note
- Hover the note and click _upload_ button## Installation
```
npm i google-drive-upload
```## Example
- Go to [https://console.developers.google.com/apis](https://console.developers.google.com/apis)
- Generate `clientId` and web client `apiKey`
- Use the following code in your client application:```
import GoogleDriveUpload from 'google-drive-upload';GoogleDriveUpload.init({
apiKey: 'your-api-key',
clientId: 'your-client-id',
});GoogleDriveUpload.upload({
title: 'Document title',
text: 'Message you want to save on your Google Drive',
})
.then(() => alert("Note successfully uploaded!"));
```The user will be asked for permission to access their Google Drive during the first upload.
In case of any questions don't hesitate to contact me. Visit my Github account where you will find my email address and Twitter.