Thành Bùi
Thành Bùi

Reputation: 21

NodeJs - Loopback : How to upload file on google cloud storage

In loopback framework, we have a module LoopBack Storage Component. It's support for many clouds except Google Cloud Storage. But I have to use Google Cloud.

Upvotes: 2

Views: 979

Answers (1)

Alexandru Savin
Alexandru Savin

Reputation: 636

It should support Google out of the box because it uses pkgcloud lib which has support for Google Cloud. Try simply adding a config entry to the providers.json file.

For more info on how to do that check Loopback storage component documentation and also pkgcloud config format for Google Cloud.

I'd just try something like this in the providers.json:

{
    "google": {
        "keyFilename": "/path/to/a/keyfile.json",
        "projectId": "your-project-id"
    }
}

Upvotes: 1

Related Questions