I'd like to get an anonymously downloadable link of a file in Google Cloud storage from firebase functions.
From JS SDK, you can get a permanently downloadable link via
const ref = storageRef.child('images/stars.jpg');
const url = await ref.getDownloadURL()
[1]. Is it possible to do the same thing from functions using firebase-admin
or firebase/storage
? I've found only a signed url[2], which is valid for up to 7 days.
[1] https://firebase.google.com/docs/storage/web/download-files
[2] https://cloud.google.com/storage/docs/access-control/signed-urls