Skip to content

Commit

Permalink
Update external storage docs (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbugli authored May 17, 2024
2 parents 0feb77e + 9d772ac commit d60597b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docusaurus/video/docusaurus/docs/api/_common_/storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ The following policy needs to be attached to your queue (replace the value of Re
To use Google Cloud Storage as your storage provider, you need to send your [service account](https://cloud.google.com/iam/docs/service-accounts-create) credentials as they are stored in your JSON file.
Stream only needs permission to write new files, it is not necessary to grant any other permission.

> **Note:**: Note: We recommend reading the credentials from the file to avoid issues with copying and pasting errors.
<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

Expand All @@ -238,12 +240,15 @@ await serverSideClient.createExternalStorage({
<TabItem value="py" label="Python">

```py
with open("/path/to/your/service-account-file.json") as service_account_file:
creds = service_account_file.read()

client.create_external_storage(
name='my-gcs',
storage_type='gcs',
bucket='my-bucket',
path='directory_name/',
gcs_credentials="content of the service account file"
gcs_credentials=creds
)
```
</TabItem>
Expand Down

0 comments on commit d60597b

Please sign in to comment.