Skip to content

heron2014/learn-upload-file-to-to-google-drive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to upload file to Google Drive

  1. To get access to the Google Account (Plus) API you will first need to create an app by visiting the google developer console: https://console.developers.google.com
  1. Install hapi-auth-google from NPM

npm install hapi-auth-google --save

  1. Export the Required Environment Variables

Once you've created your app you will have generated client_id and client_secret.

GOOGLE_CLIENT_ID=YourAppsClientId.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=SuperSecret
PORT=8000
BASE_URL=http://localhost:8000 # Must be identical to "Authorized JavaScript Origin"
  1. Create an empty file in the lib folder and call it tokens.json (your tokens will be saved into this file see L5)

  2. Install all needed dependencies see L24-L31

Reference:

About

Learn how to upload the file to google drive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published