This is a simple node.js script to upload files to google drive using google drive api. This script uses googleapis library to authenticate and upload files to google drive.
- Node.js
- Google Drive API credentials
- Google Drive API Node.js client library
- Clone this repository
- Install the required packages using
npm install - Create a new project in Google Cloud Console
- Enable Google Drive API for the project
- Create credentials for the project
- Download the credentials file and rename it to
credentials.json - Place the
credentials.jsonfile in the root of the project - Run the script using
node index.js
This project is licensed under the MIT License - see the LICENSE file for details
- POST /upload
- Request body:
- file: file to be uploaded
- folderId: folder id in which the file should be uploaded