相关疑难解决方法(0)

从使用Cloud Functions for Firebase上传的文件中获取下载URL

在Firebase存储中使用函数for Firebase上传文件后,我想获取该文件的下载URL.

我有这个 :

...

return bucket
    .upload(fromFilePath, {destination: toFilePath})
    .then((err, file) => {

        // Get the download url of file

    });
Run Code Online (Sandbox Code Playgroud)

目标文件有很多参数.甚至一个名字mediaLink.但是,如果我尝试访问此链接,我会收到此错误:

匿名用户没有storage.objects.get访问对象...

有人可以告诉我如何获取公共下载Url?

谢谢

node.js firebase google-cloud-functions firebase-storage

86
推荐指数
14
解决办法
4万
查看次数