我最近收到了此错误消息,我想知道为什么。
获取gs://example.appspot.com/images net :: err_unknown_url_scheme
以下是我对存储服务的引用:
var storage = firebase.storage();
var storageRef = storage.ref();
var storageRefImgs = storageRef.child('images');
我有Google Chrome 51,并且正在运行Windows 10。
似乎您将gs://
URL(是内部的Google Storage引用)放入无法处理它的控件中(例如img
标签)。
如果要在img
标签中使用该文件,则必须获取文件的下载URL。从文档中:
storageRef.child('images/stars.jpg').getDownloadURL().then(function(url) {
// Get the download URL for 'images/stars.jpg'
// This can be inserted into an <img> tag
// This can also be downloaded directly
}).catch(function(error) {
// Handle any errors
});