存储上的Firebasefunction是否存在通配符?

我已成功使用Firebasefunction对我上传到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" } 

谢谢!

目前云存储触发器没有通配符支持。 你必须检查文件的path,如果你想用它做任何事情,就要弄清楚。