GeezerVison is showing github.com — can not connect google @ google-cloud / storage to the project. · Issue #385 · GoogleCloudPlatform/nodejs-docs-samples
can not connect google @ google-cloud / storage to the project. #385
Labels
🚨This issue needs some love.triage meI really want to be triaged. Description
Hello! I tried to connect google cloud storage to the project as follows.
MacBook-Pro:node_modules alexsanderjob$ npm install --save @google-cloud/storage
npm WARN deprecated [email protected]: Use uuid module instead
functions@ /Users/alexsanderjob/Desktop/ExampleCloudFunctions/functions
└── @google-cloud/[email protected]
I wrote the following code in index.js
// Imports the Google Cloud client library
const Storage = require('@google-cloud/storage');
// Your Google Cloud Platform project ID
const projectId = 'example-example7';
// Instantiates a client
const storageClient = Storage({
projectId: projectId
});
When I open this file through the Visual Studio Code, and when I try to interact with the storage client, nothing happens. My case is the following, I need to delete photos of user cards from Firebase Storage when it deleted my account. Please tell me how it can be done?
Activity
jmdobry commented on May 10, 2017
Delete a single file in a bucket
Delete all files in a bucket:
const Storage = require('@google-cloud/storage');
// Instantiates a client
const storageClient = Storage({ projectId: 'example-example7' });
// References an existing bucket, e.g. "my-bucket"
const bucket = storageClient.bucket('my-bucket');
// Deletes all files in the bucket
bucket.deleteFiles()
.then(() => {
console.log('All files deleted.');
})
.catch((err) => {
console.error('ERROR:', err);
});
Delete a bucket
Reacted by Alexander Khitev and lucasbeef
Reacted by Lucas Rangel
ace-n commented on Aug 21, 2017
Closing due to staleness; @alexsanderkhitev feel free to reopen if you're still having trouble. Thanks!
Metadata
Metadata
🚨This issue needs some love.triage meI really want to be triaged. Development
No branches or pull requestsIssue actions