FR
frycz/google-drive-upload
:outbox_tray: Easily build applications allowing users to upload text to Google Drive as Docs files
Google Drive Upload
Easily build applications allowing users to upload text to Google Drive as Docs files.
Demo
- Go to 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
- Generate
clientIdand web clientapiKey - 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.
On this page
Languages
JavaScript100.0%
Contributors
Latest Release
v1.0.5June 11, 2020MIT License
Created August 6, 2018
Updated September 25, 2023
