Firebase Storage对象的下载URL是否永久存在? [英] Do download URLs of Firebase Storage objects live forever?

查看:85
本文介绍了Firebase Storage对象的下载URL是否永久存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您将文件上传到Firebase的存储中并询问对象URL时,无论您对该对象设置了什么权限,都会得到一个像http://firebasestorage.googleapis.com/v0/b/appname/o/filename?alt=media&token=somelongtoken这样的可公开访问的URL,但是令牌使它变得不可猜测. 令牌"一词表明此URL不会永远存在.是吗?

When you upload files to Firebase's Storage then ask for the object URL, you get a publicly accessible URL like http://firebasestorage.googleapis.com/v0/b/appname/o/filename?alt=media&token=somelongtoken no matter what permissions you've set on the object, but the token makes it unguessable. The word "token" suggests that this URL won't live forever. Does it?

Reference.getDownloadURL JavaScript参考表示: 获取此对象的长期下载URL."我不确定长寿"的含义,并且在文档的其他地方也没有看到任何详细说明.他们的示例都让客户端请求下载URL,然后将其用作临时用途,并且他们没有说是否可以将其存储以备后用.

The Javascript reference for Reference.getDownloadURL says: "Fetches a long lived download URL for this object." I'm not sure what they mean by "long-lived," and I haven't seen any elaboration on that elsewhere in the docs. Their examples all have the client request the download URL then use it for a temporary purpose, and they don't say whether it's ok to store it for later.

我还在此处有人写了一个链接缩短器的地方,建议您可以永久保留URL,因为您不会绕过临时的缩短链接.

I also see an article here where someone wrote a link shortener, suggesting you can keep the URL forever since you wouldn't pass around a shortened link that's temporary.

推荐答案

它的寿命将比您的应用程序的寿命长.实际上,它不会永远"存在,但您不必担心.

It will guaranteed live longer than your app will live. Practically speaking, it won't live "forever", but you won't have to worry about it.

这篇关于Firebase Storage对象的下载URL是否永久存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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