【发布时间】:2016-11-10 02:15:20
【问题描述】:
为了我的应用程序的正确安全性,我不得不为 firebase 设置一个小型 nodejs 服务器,但问题还没有结束……firebase 服务器 sdk 不支持存储 api。我读到这是必要的 gcloud 存储 api,因为 firebase 使用相同的服务。
在服务器端获取文件自定义元数据很重要,因为我必须读取和更新它们。我找不到合适的函数来获取文件元数据。在客户端 sdk 中很简单
// Create a reference to the file whose metadata we want to retrieve
var forestRef = storageRef.child('images/forest.jpg');
// Get metadata properties
forestRef.getMetadata().then(function(metadata) {
// Metadata now contains the metadata for 'images/forest.jpg'
}).catch(function(error) {
// Uh-oh, an error occurred!
});
在 gcloud 存储中我可以使用什么功能?谢谢
【问题讨论】: