mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 18:19:34 +00:00
Update documentation of the section plugin Google Cloud Storage
Signed-off-by: Vanessa Pasque (Lith) <lith@amykron.com>
This commit is contained in:
parent
8d01c1029c
commit
2b6ff54dbe
@ -262,25 +262,7 @@ yarn add strapi-provider-upload-google-cloud-storage
|
|||||||
|
|
||||||
Deploy so that the server app includes the dependency from `package.json`.
|
Deploy so that the server app includes the dependency from `package.json`.
|
||||||
|
|
||||||
Create a Google service account key.
|
Follow the [documentation of the plugin](https://github.com/Lith/strapi-provider-upload-google-cloud-storage/blob/master/README.md) for the full configuration.
|
||||||
|
|
||||||
<https://console.cloud.google.com/apis/credentials/serviceaccountkey>
|
|
||||||
|
|
||||||
Save the JSON credentials file.
|
|
||||||
|
|
||||||
Plugins > File Upload > Settings > Production tab
|
|
||||||
|
|
||||||
By default `localhost` is selected. Select the `Google Cloud Storage` plugin.
|
|
||||||
|
|
||||||
Copy the JSON key and set the regions.
|
|
||||||
|
|
||||||
Open the `Cloud Console > Storage > Browser` menu.
|
|
||||||
|
|
||||||
Copy the bucket name to the plugin settings, the default is the app ID, such as `myapi-123456.appspot.com`.
|
|
||||||
|
|
||||||
(Note that the `Access control` setting of the bucket has to be `Fine-grained`, which is the default.)
|
|
||||||
|
|
||||||
Click `Save`, and it's ready to go!
|
|
||||||
|
|
||||||
### Post-setup configuration
|
### Post-setup configuration
|
||||||
|
|
||||||
|
|||||||
@ -237,34 +237,7 @@ yarn add strapi-provider-upload-google-cloud-storage
|
|||||||
|
|
||||||
Deploy so that the server app includes the dependency from `package.json`.
|
Deploy so that the server app includes the dependency from `package.json`.
|
||||||
|
|
||||||
Create a Google service account key.
|
Follow the [documentation of the plugin](https://github.com/Lith/strapi-provider-upload-google-cloud-storage/blob/master/README.md) for the full configuration.
|
||||||
|
|
||||||
<https://console.cloud.google.com/apis/credentials/serviceaccountkey>
|
|
||||||
|
|
||||||
Save the JSON credentials file.
|
|
||||||
|
|
||||||
Open the JSON credentials file, copy all the content and set an environment variable named as `GCS_SERVICE_ACCOUNT`
|
|
||||||
|
|
||||||
Create a settings.json file in below path
|
|
||||||
|
|
||||||
```
|
|
||||||
./extensions/upload/config/settings.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Paste in the code below, replace `###YOUR BUCKET NAME###` with your bucket name such as `myapi-123456.appspot.com`
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"provider": "google-cloud-storage",
|
|
||||||
"providerOptions": {
|
|
||||||
"serviceAccount": "${process.env.GCS_SERVICE_ACCOUNT}",
|
|
||||||
"bucketName": "###YOUR BUCKET NAME###",
|
|
||||||
"baseUrl": "https://storage.googleapis.com/###YOUR BUCKET NAME###"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
(Note that the `Access control` setting of the bucket has to be `Fine-grained`, which is the default.)
|
|
||||||
|
|
||||||
### Post-setup configuration
|
### Post-setup configuration
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user