有什么方法可以以编程方式撤消从Firebase存储上的私有URL生成的公共下载URL? [英] Is there any way to revoke public download url generated from private url on firebase storage programmatically?

查看:44
本文介绍了有什么方法可以以编程方式撤消从Firebase存储上的私有URL生成的公共下载URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我正在开发一个可连接到Firebase并将重要文档上传到Firebase存储的应用程序.

Recently I am developing an app which connects to firebase and upload important documents to firebase storage.

有些用户将查看上载的文档,因此我在上载文档后生成了下载URL,并将下载URL存储到了Firebase数据库中,以便该应用程序将获得下载URL并使用它.

There are users who will view uploaded documents, so I generated download URL after upload document and stored download url into firebase database so that the app will get download url and use it.

顺便说一句,一旦生成了下载网址,它就是公开的,因此任何人都可以使用该链接查看Firebase存储上的上载文档.

Btw, once generated download url, it is public so anyone can use the link to view the uploaded document on firebase storage.

因此,我决定将文档的私有URL存储到Firebase数据库中,然后,一旦有效用户想要查看该文档,该应用程序就会从私有URL生成下载URL,然后使用该链接显示给用户.

So I decided to store private url of document into firebase database and then once valid user wants to view the document, the app will generate download url from private url and then use the link to show to the user.

然后在查看之后,我想以编程方式在应用程序上撤消文档的下载URL.

And then right after viewing, I want to revoke download url of the document programmatically on the app.

我看到我可以在浏览器的Firebase存储上手动撤消下载URL,但是我想以编程方式在我的应用程序中完成该操作.

I see I can manually revoke download url on firebase storage on browser, but I want to do it programmatically on my app.

为了安全起见,这非常重要.

For security, this is very important.

有人可以帮助我吗?

推荐答案

当前没有公共API可以撤消Cloud Storage for Firebase的下载URL.撤消下载URL的唯一方法是通过Firebase控制台.

There currently is no public API to revoke download URLs from Cloud Storage for Firebase. The only way to revoke download URLs is through the Firebase console.

我建议您提交功能请求.

相关:

这篇关于有什么方法可以以编程方式撤消从Firebase存储上的私有URL生成的公共下载URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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