Firebase Storage very slow compared to Firebase Hosting

后端 未结 2 2073
囚心锁ツ
囚心锁ツ 2020-12-16 13:27

Anyone know why firebase storage would be so ridiculously slow compared to firebase hosting?

Results

  • Time to download image of fireba
2条回答
  •  醉酒成梦
    2020-12-16 14:06

    I found the solution.

    If you have your files already uploaded to storage go to: https://console.cloud.google.com/storage/browser?project=your_project > pick your bucket > select all interesting files and click Make public (or something similar - I'm not english native).

    To have all new uploaded files public by default you need to install Google cloud SDK (https://cloud.google.com/sdk/docs/) and from your command line use the following command for your bucket:

    gsutil defacl set public-read gs://your_bucket

    After that all my current and new images are available here storage.googleapis.com/my_project.appspot.com/img/image_name.jpg and downloading time is definitely shorter.

提交回复
热议问题