Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
node-gdrive
Advanced tools
Upload file to google drive
With npm do:
npm install node-gdrive
Use command line global:
npm install node-gdrive -g
gdrive token:get # generator new token
const Drive = require("node-gdrive");
// Get token
const drive = new Drive();
const authUrl = drive.generateAuthUrl();
console.log(`Please go to ${authUrl}`);
var code = '4/1ARtbsJpwJLAnoUT2stmrXABWcmzdvnuF6j_mV3f_ELNQcOrzyqgVz1j0o04';
var token = await drive.reedemCode(code);
// upload file
let filePath = 'foo.txt';
var upload = drive.upload(filePath, {share: true});
upload.on('*', (event, data) => {
console.log(event, data);
});
// Download file
let fileId = "1eoAgH8xgBkkUDXkTdyPSHSbaJViv33oX";
drive
.download(fileId, {
resumable: true, // Resume download session
force: false, // Override file if exists
output: './tmp/', // Dir or filepath to save file
})
.then(file => {
console.log("file", file);
})
.catch(err => {
console.error("err", err);
});
gdrive upload file.txt --share user@gmail.com # upload and share file
gdrive donwload 1eoAgH8xgBkkUDXkTdyPSHSbaJViv33oX # download file
gdrive --help
MIT
FAQs
Google driver for node
We found that node-gdrive 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.