4

最近、このエラー メッセージが表示されますが、その理由が気になります。

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 を実行しています。

4

1 に答える 1

10

gs://URL (Google ストレージの内部参照) を、それを処理できないコントロール (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
});
于 2016-06-28T13:19:03.910 に答える