Google Cloud Storage 'static' bucketname not available

本秂侑毒 提交于 2020-04-13 06:45:07

问题


I am currently structuring a web application to serve out segments of our database represented as html iframes. I need to host my Django app's static files (such as bootstrap) in a static file store on Google Cloud Storage in order to correctly represent the HTML elements. However, when I try to create a bucket called 'static', GCS replies with the following error:

Sorry, that name is not available. Please try a different one.

Not only that, it is not allowing me to access or modify the URI, displaying a "Forbidden" message when I attempt to.

Does anyone know how to change this default setting by Google? There is no documentation regarding this..


回答1:


It seems that the bucket with the given name has been already created by someone else. You have to choose a globally unique name.

Bucket names reside in a single Google Cloud Storage namespace. As a consequence, every bucket name must be unique across the entire Google Cloud Storage namespace. If you try to create a bucket with a bucket name that is already taken, Google Cloud Storage responds with an error message.

Use another name or use the default bucket. If your app was created after the App Engine 1.9.0 release, it should have a default GCS bucket named [your-app-id].appspot.com available. You can create your static files in that bucket and mimic directory structure as follows.

[your-app-id].appspot.com/static/my-file-1


来源:https://stackoverflow.com/questions/25127112/google-cloud-storage-static-bucketname-not-available

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