How can I access files from a Google Cloud Storage bucket from a browser?

后端 未结 4 1027
[愿得一人]
[愿得一人] 2020-12-14 11:36

I am using Google Cloud Storage to store images for my Google App Engine application and I\'m trying to access the images like so:



        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 11:46

    And finally after 2 days, got it working.here is the answer: My approach for this is wrong, no need for signed URL. i need to just add my bucket as public-read so that i can read it from browser request. thats all. open gsutil, type this:

    gsutil -m acl -r set public-read gs://BUCKET_NAME
    

    and set this as default for all future uploads

    gsutil -m defacl set public-read gs://BUCKET_NAME
    

    hope it helps someone !

    Thanks to @kctang !

提交回复
热议问题