GCP Storage
Note
gsutil
is being phased out. Look for replacements ingcloud
.
To edit CORS
configuration for a specific bucket, run this on the console command line:
gcloud storage buckets update gs://sphil-test-assets-bucket --cors-file=cors-config.json
[ { "origin": ["http://localhost:3000"], "method": ["GET", "POST", "PUT", "DELETE"], "responseHeader": ["Content-Type"], "maxAgeSeconds": 3600 } ]
Clear CORS:
gcloud storage buckets update gs://BUCKET_NAME --clear-cors
In order to change permissions of all items and subitems in a folder:
gsutil acl -r ch -u AllUsers:R gs://[BUCKET_NAME]/[FOLDER_NAME]/*
© Filip Niklas 2024. All poetry rights reserved. Permission is hereby granted to freely copy and use notes about programming and any code.