Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove constructor's project id, key file requirements #19

Open
dpkirchner opened this issue Mar 30, 2020 · 0 comments
Open

Remove constructor's project id, key file requirements #19

dpkirchner opened this issue Mar 30, 2020 · 0 comments

Comments

@dpkirchner
Copy link

The Storage class from @googleapis/nodejs-storage doesn't require the caller to pass a project id or keyfile. If you don't specify them, the library will try to look up the values using Google's "application default credentials" code. As such, the throws here can be removed, and the object passed to Storage can be empty or absent:

https://github.com/ARozar/multer-google-storage/blob/master/src/index.ts#L39

See: https://googleapis.dev/nodejs/storage/latest/Storage.html#Storage-examples and https://cloud.google.com/docs/authentication/production#finding_credentials_automatically

@dpkirchner dpkirchner changed the title GCS' Storage class doesn't require a project id or keyfile Remove constructor's project id, key file requirements Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant