Inside a cloud function, how can I get the download-url of a storage file?
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const storage = admin.storage();
Using this storage object I can do storage.bucket().file(path).getMetadata()
but the returned metadata does not contain the firebase-signed-download-url.
The docs says to create a reference and do reference.getDownloadURL()
. Only thing is that this does not seem to work with the storage object returned from the firebase-admin package.