将Firebase存储公开以在Android上进行读写 [英] Making firebase storage public for reading and writing on android

本文介绍了将Firebase存储公开以在Android上进行读写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Firebase存储的新手.谁能告诉我如何将存储文件公开以进行读写? firebase提供的默认代码如下.我应该做些什么改变?

I am new to firebase storage. Can anyone tell me how to make the storage files public for reading and writing?. The default code provided by firebase is given below. What changes should I make ?

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}

推荐答案

documentation 解释说,如果未提供任何规则表达式,则该规则的计算结果为true:

The documentation explains that if no rule expression is provided, the rule evaluates to true:

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      // Allow access by all users
      allow read, write;
    }
  }
}

这篇关于将Firebase存储公开以在Android上进行读写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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