Merge pull request #6275 from Lith/docs/google-app-engine

Update documentation of the section plugin Google Cloud Storage
This commit is contained in:
Jim LAURIE 2020-06-05 14:10:04 +02:00 committed by GitHub
commit a3ada86af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 47 deletions

View File

@ -262,25 +262,7 @@ yarn add strapi-provider-upload-google-cloud-storage
Deploy so that the server app includes the dependency from `package.json`.
Create a Google service account key.
<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!
Follow the [documentation of the plugin](https://github.com/Lith/strapi-provider-upload-google-cloud-storage/blob/master/README.md) for the full configuration.
### Post-setup configuration

View File

@ -237,34 +237,7 @@ yarn add strapi-provider-upload-google-cloud-storage
Deploy so that the server app includes the dependency from `package.json`.
Create a Google service account key.
<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.)
Follow the [documentation of the plugin](https://github.com/Lith/strapi-provider-upload-google-cloud-storage/blob/master/README.md) for the full configuration.
### Post-setup configuration