Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do download URLs of Firebase Storage objects live forever?

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?

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.

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.

like image 388
sudo Avatar asked Jul 17 '18 04:07

sudo


1 Answers

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.

like image 143
Doug Stevenson Avatar answered Oct 27 '22 17:10

Doug Stevenson