Firebase Storage gs url to http

早过忘川 提交于 2019-12-22 18:59:11

问题


I downloaded a Unity project that use images stored in Firebase server using the following link: https://zplayer360-86b30.firebaseapp.com

Now I want to reproduce this with my own file. I created a Firebase project using Firebase Console, uploaded manually the images, but now I click "copy folder url" button and it provide me only this link: gs://insidehome-29c9e.appspot.com/

I need a free HTTP public link. How can I obtain this?


回答1:


When you upload a file to Firebase Storage, it automatically gets:

  • a Google Storage URL (starting with gs://), which you can use to access the file through the Firebase Storage SDK and the Google Storage API.
  • a download URL (starting with https://), which is a publicly-readable-but-non-guessable URL that you can use to download the URL with regular HTTP clients

What you're looking for is the second URL, which you can find in the Firebase Storage console when you select a file:

At the bottom right you can see the download URLs for the file. One of these is auto-created when you upload the file, but you can create more of them or revoke existing ones.

I am not entirely sure what you mean by "free" URL. The link is publicly readable, but downloads will count against your Firebase Storage download quota of course.



来源:https://stackoverflow.com/questions/41763973/firebase-storage-gs-url-to-http

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!