Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
gdrive-node
Advanced tools
Simple way to upload and manage google drive files
Weekly downloads
Readme
Include index.js where you want to use
const drive = require('./index');
var config = require('./config'); ///your config file
exports.creds = "credentials.json"
const drive = require('gdrive-node');
var config = require('./config'); ///your config file
drive.auth(config.creds)
.then((accesstoken)=>{
//do whatever you want to do with google api
})
drive.upload(config.creds, 'test123.pdf', 'files/test.pdf', 'application/pdf', false, function(data){
console.log('File uploaded successfully, File id is : '+ data);
});
drive.createFolder(config.creds,'my test folder', false, function(id){
console.log(id);
})
const readline = require('readline'); //for manually verification only
//Manual Authentication
drive.auth_manual(config.creds)
.then((auth_url)=>{
if(!auth_url)
{
console.log("You are already signed in, you can delete token.json to sign in from different accout");
}
else
{
//get the auth url by calling auth_manaual() function and get the code by clicking or redirecting to that code also you can usue a web check in form to get code
console.log('Click here:', auth_url);
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
rl.question('Enter the code from that page here: ', (code) => {
rl.close();
drive.saveAccessToken(code); //a separate function to save token
});
}
});
FAQs
Simple way to upload and manage google drive files
The npm package gdrive-node receives a total of 1 weekly downloads. As such, gdrive-node popularity was classified as not popular.
We found that gdrive-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.