
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
google-cloud-directory-upload
Advanced tools
To upload files and folder from a local directory to google cloud storage bucket.
To upload files and folder from a directory to google cloud bucket.
$ npm install google-cloud-directory-upload
var uploadDirectory = require("google-cloud-directory-upload");
// options
const options = {
bucketName: "bucketName", // Google Cloud bucket name
keyFilename: "../../keys.json", // Bucket configuration key file path
directoryPath: "../../tests/reports/mochareports", // Directory to upload
bucketPath: "report", // optional, Unique bucket folder name
metaData: { // optional
predefinedAcl: "publicRead",
},
};
// request
(async () => {
console.log(await uploadDirectory(options)); // returns <response_data>
})();
// response
{
status: 200,
files: '7 files uploaded successfully',
fileList: [
'/tests/reports/mochareports/assets/app.css',
'/tests/reports/mochareports/assets/app.css.map',
'/tests/reports/mochareports/assets/app.js',
'/tests/reports/mochareports/assets/app.js.LICENSE.txt',
'/tests/reports/mochareports/assets/app.js.map',
'/tests/reports/mochareports/assets/MaterialIcons-Regular.woff',
'/tests/reports/mochareports/assets/MaterialIcons-Regular.woff2',
],
bucketUrl: 'https://storage.googleapis.com/{bucketName}/{bucketPath}'
}
For more google cloud storage options follow Google Cloud Storage.
Copyright © 2021. S.Gupta
FAQs
To upload files and folder from a local directory to google cloud storage bucket.
We found that google-cloud-directory-upload 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.