Cloud Functions for Firebase 从 google 存储下载
Cloud Functions for Firebase download from google storage
我在 firebase 中有一个集合,看起来像这样:
people:
-KuM2GgA5JdH0Inem6lGaddclose
appliedTo: "-KuM1IB5TisBtc34y2Bb"
document: "docs/837c2500-9cbe-11e7-8ac1-17a6c37e2057"
name: "Test Testerson"
文档节点包含存储桶中文件的路径。是否可以使用 http firebase 函数将此文件下载到客户端。根据 Stream files in node/express to client I should be able to stream to response in express. Will the google-storage readstream 工作?
谢谢,
本
Firebase Admin SDK 有一个 Storage object you can use. It gives you an entry point into the Google Cloud Storage SDK 可以与存储桶交互。
const bucket = admin.storage().bucket
使用此 Bucket 对象上传和下载文件。您应该能够使用流向客户端发送内容。
我在 firebase 中有一个集合,看起来像这样:
people:
-KuM2GgA5JdH0Inem6lGaddclose
appliedTo: "-KuM1IB5TisBtc34y2Bb"
document: "docs/837c2500-9cbe-11e7-8ac1-17a6c37e2057"
name: "Test Testerson"
文档节点包含存储桶中文件的路径。是否可以使用 http firebase 函数将此文件下载到客户端。根据 Stream files in node/express to client I should be able to stream to response in express. Will the google-storage readstream 工作?
谢谢,
本
Firebase Admin SDK 有一个 Storage object you can use. It gives you an entry point into the Google Cloud Storage SDK 可以与存储桶交互。
const bucket = admin.storage().bucket
使用此 Bucket 对象上传和下载文件。您应该能够使用流向客户端发送内容。