SETUP GUIDES · FILE STORAGE
Google Cloud Storage bucket
Store your app’s files in Google Cloud Storage.
Google Cloud Storage can be used the same way as Amazon S3 through its “interoperability” keys. You give a service account access to one bucket and create such a key for it.
Words you’ll see
- Bucket
- A storage container for files at a storage provider, like a top-level folder in the cloud. Your app’s uploads go into it.
- Service account
- In Google Cloud, an account for a program rather than a person. You give it one role and download a key file for it.
- Access key ID and secret access key
- A pair of values that works like a username and password for programs. The ID can be shown; the secret is shown once when you create it.
- CORS
- A browser safety setting on the bucket that says which websites may upload or download directly. Without it, browsers block uploads from your app.
Steps
- Open Cloud Storage and create a bucket. Keep public access prevented.
- In IAM & Admin → Service accounts, create a service account named
spine-storage. Skip the project role step. - Back on your bucket’s Permissions tab, click Grant access, add the service account and give it the role Storage Object User. This applies to this bucket only.
- Open Cloud Storage → Settings → Interoperability and click Create a key for a service account. Pick
spine-storageand copy the access key and secret. - Set a CORS rule on the bucket for your app’s web address (for example with
gcloud storage buckets update gs://your-bucket --cors-file=cors.json). - Open the Claspine console, choose your project and go to File Storage.
- Pick this provider in the list, then fill in the fields as shown in “What goes where in Claspine” below.
- Click Save & test. Claspine writes one tiny test file into your bucket, reads it back and deletes it. A green result means everything is connected.
What goes where in Claspine
| Console field | Value |
|---|---|
| ENDPOINT | https://storage.googleapis.com |
| REGION | auto |
| ACCESS KEY ID / SECRET | The interoperability key from step 4. |
Keep it safe
- Granting the role on the bucket, not on the whole project, keeps the key away from your other buckets.
Claspine stores the values encrypted, never shows them again in full, and never sends them to your app or SDK.