1
votes

I'm working on a project with React and Firebase. And I'm using Firebase Storage.

From https://firebase.google.com/docs/storage/gcp-integration

Under the hood, Firebase SDKs for Cloud Storage use the default bucket in the Google App Engine free tier. This allows you to quickly get up and running with Cloud Storage, without having to put in a credit card or enable a billing account. It also allows you to easily share data between Firebase and a Google Cloud Platform project.

So this is why I'm asking this in a google cloud storage context:

QUESTION

Are storage buckets folder names case sensitive or insensitive?

//BUCKET/somefolder === //BUCKET/SomeFolder ???

Is there some best practice on naming folders?

  • some-folder
  • some_folder
  • someFolder
  • somefolder

Is there a best option between the ones listed above?

2

2 Answers

1
votes

Not in particular here you find a list with the "forbidden" way of naming https://cloud.google.com/storage/docs/naming Further You can find best practices here: https://cloud.google.com/storage/docs/best-practices To quote from it

bucket names should only contain smaller case letters, number, minus (-), ->underscore (_) and .

1
votes

For people still wondering about it - There is no such thing as folders in Google cloud storage, any folder name is part of the object name.

According to the docs

For example, you can name an object /europe/france/paris.jpg to make it appear that paris.jpg resides in the subdirectory /europe/france, but to Cloud Storage, the object simply exists in the bucket and has the name /europe/france/paris.jpg

So, the naming convention for Object names apply for folder names as well. Docs for naming objects: https://cloud.google.com/storage/docs/naming-objects

Since the name can contain any sequence of unicode characters, and not limited to lowercase(as in bucket names), the object and folder names are case sensitive, i.e /folder/a.png is different from /folder/A.png or /Folder/a.png