是否可以将Firebase函数的范围限制在存储桶中的文件夹? [英] Is it possible to scope Firebase functions to a folder inside a storage bucket?

查看:110
本文介绍了是否可以将Firebase函数的范围限制在存储桶中的文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功测试了Firebase的存储功能。但是,我没有看到任何提示,只有当一个文件被添加到我的桶内的文件夹时才调用函数。我已经看到关于范围函数的唯一提示是针对不同的桶这里

是否可以将函数范围限定在我的存储桶中的某个文件夹中,如果是,如何?
或者我需要有多个桶而不是文件夹来分隔不同的任务。

目前还没有办法触发云功能,只能在Cloud Storage中的特定文件夹中写入。如果您想将触发限制为项目中文件的一个子集,将它们放在单独的存储桶中是目前实现这一目标的唯一方法。


I have tested Firebase functions for storage successfully. However, I havn't seen anywhere a hint how to only invoke the function when a file is added into a folder inside my bucket. The only hint I have seen about scoping the function is for different buckets here.

Is it possible to scope the function to a folder inside my bucket , if yes how? Or would I need to have multiple buckets instead of folders to separate different tasks.

解决方案

firebaser here

There is currently no way to trigger Cloud Functions only for writes in a specific folder in Cloud Storage. If you want to limit the triggering to a subset of the files in your project, putting them in a separate bucket is currently the only way to accomplish that.

这篇关于是否可以将Firebase函数的范围限制在存储桶中的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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