Hi Google community, Our process for uploading new content to our bucket files doesn't appear to be working? our process for overwriting buckets/folders that are already live with updates is to:
1. Go to folder within Bucket on GCP Console
2. Click upload Folder
3. Select file to upload (extracted file, folder name identical)
4. Pop up box asking for actions: select overwrite and then apply to all files and upload
The above steps would usually overwrite the Content folder bringing in new changes to the following folders:
Assets, Goodbye.html, Index, Lib, Locales
However, now instead of this it is bringing over all singular files within the above folders and our URL appears blank.
Advice greatly appreciated.
Hello @MA2014,
Welcome to Google Cloud Community!
This is an intended behavior. Take a look at Object namespace. Cloud storage objects resides in a flat namespace, which means that objects don't reside within subdirectories in a bucket. As stated in the documentation:
For example, if you create an object named
folder1/file.txt
in the bucketyour-bucket
, the path to the object isyour-bucket/folder1/file.txt
, and Cloud Storage has no folder namedfolder1
stored within it. From the perspective of Cloud Storage, the stringfolder1/
is part of the object's name.
When you're doing your process, which is clicking UPLOAD FOLDER, you are actually uploading the contents of your folder into that directory. This will result to overwriting the objects in the bucket. Overwritten objects will lose their public access/urls.
You can do the following steps to overwrite the contents of a selected folder:
If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Hope it helps, thanks!