【发布时间】:2016-09-07 11:26:13
【问题描述】:
有没有办法重命名或从 Firebase 存储下载文件?
我没有看到重命名方法和下载方法。
我尝试通过网址下载文件,但它根本不起作用
var blob = null;
var xhr = new XMLHttpRequest();
xhr.open("GET", "downloadURL");
xhr.responseType = "blob";
xhr.onload = function()
{
blob = xhr.response;//xhr.response is now a blob object
console.log(blob);
}
xhr.send();
返回
No 'Access-Control-Allow-Origin' header is present on the requested resource.
【问题讨论】:
-
Firebase 存储上没有用于重命名/移动文件的内置 API。见stackoverflow.com/questions/38601548/…
标签: javascript firebase xmlhttprequest blob firebase-storage