NodeJs - Loopback:如何在google云存储上上传文件 [英] NodeJs - Loopback : How to upload file on google cloud storage

查看:532
本文介绍了NodeJs - Loopback:如何在google云存储上上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在回送框架中,我们有一个模块LoopBack存储组件。它支持除Google Cloud Storage之外的许多云。但是我必须使用Google Cloud。

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.

推荐答案

它应该支持Google开箱即用,因为它使用pkgcloud lib, Google云端。尝试简单地添加一个配置项到providers.json文件中。

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.

有关如何执行该检查的更多信息 Loopback storage component 文档以及 pkgcloud Google Cloud的配置格式。

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

我会只需在providers.json中试试这样:

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

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

这篇关于NodeJs - Loopback:如何在google云存储上上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆