If you are using containers for deployment (including Docker and Heroku), you should avoid storing files in the container’s volatile filesystem.
This integration allows you to delegate storing such files to Google Cloud Storage (GCS) service.
GOOGLE_APPLICATION_CREDENTIALS- Set an environment variable to a path of the json file.
GS_CREDENTIALS- Optional. Use the OAuth 2 credentials for the connection. If unset, it reverts to the default inferred from the environment (i.e.
Serving media files with a GCS bucket
If you want to store and serve media files, set the following environment variable to use GCS as media bucket:
GS_MEDIA_BUCKET_NAME- The GCS bucket name to use for media files.
The media files are all data uploaded through the dashboard (product images, category images, etc.).
Serving static files with a GCS bucket
By default, static files (such as CSS and JS files required to display your pages) will be served by the application server.
If you also intend to use GCS for your static files, set an additional environment variable:
GS_STORAGE_BUCKET_NAME- The GCS bucket name to use for static files.
<CorsConfig> <Cors> <Origins> <Origin>http://origin1.example.com</Origin> <Origin>http://origin2.example.com</Origin> </Origins> <Methods> <Method>GET</Method> <Method>HEAD</Method> <Method>PUT</Method> <Method>POST</Method> <Method>DELETE</Method> </Methods> <ResponseHeaders> <ResponseHeader>x-goog-meta-foo1</ResponseHeader> <ResponseHeader>x-goog-meta-foo2</ResponseHeader> </ResponseHeaders> <MaxAgeSec>1800</MaxAgeSec> </Cors> </CorsConfig>