Serving static files from google cloud storage?

google-app-engine, google-cloud-storage

Solution

I'm not sure how you are uploading your files and why the public read is not set correctly, but you could also change that through the Google Cloud Storage Manager. Simply locate the bucket and the file and click on the `Share Publicly` checkmark and you'll get the link.

Or you can upload that file using the gsutil with public read right away:

gsutil cp -a public-read custom.css gs://my_backet

Problem

I wanted to serve static files stored in google cloud storage for app hosted in app engine. In HTML file, I used ``` <link href="https://storage.cloud.google.com/my_bucket/custom.css" rel="stylesheet"> ``` It works properly, if the google account of logged in user has permission to access bucket. Since app can be accessed by anyone who will not have access to my bucket and in such case, static files will not be served. Is it possible to make static files in bucket publicly available? I made static file(custom.css) as 'shared publicly'(ACL set to 'public-read') but still other users can't access it.

Original source

Related problems