MQL*_*QLN 3 node.js firebase google-cloud-functions firebase-storage
我一直在使用成功的Firebase功能对我上传到Firebase存储的文件执行操作.
我目前想要做的是使用通配符访问我正在推送数据的文件夹,其实现方法与实时数据库+ Firestore的工作方式相同.但是,每当我尝试访问这些参数时,它们都会返回null.
这不可能吗?
这是我的代码示例:
exports.generateThumbnail = functions.storage.object('user-photos/{userId}/{publicOrPrivate}').onChange(event => {
const privateOrPublic = event.params.publicOrPrivate;
const isPrivate = (event.params.publicOrPrivate == "private");
const userId = event.params.userId;
console.log("user id and publicOrPrivate are", userId, privateOrPublic);
//"user id and publicOrPrivate are undefined undefined"
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
| 归档时间: |
|
| 查看次数: |
284 次 |
| 最近记录: |