diff --git a/packages/strapi-provider-upload-aws-s3/README.md b/packages/strapi-provider-upload-aws-s3/README.md index 2df1205e35..c6f6313204 100644 --- a/packages/strapi-provider-upload-aws-s3/README.md +++ b/packages/strapi-provider-upload-aws-s3/README.md @@ -4,22 +4,28 @@ Your configuration is passed down to the provider. (e.g: `new AWS.S3(config)`). You can see the complete list of options [here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property) +See the [using a provider](https://strapi.io/documentation/v3.x/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://strapi.io/documentation/v3.x/concepts/configurations.html#environment-variables) for setting and using environment variables in your configs. + **Example** -`./extensions/upload/config/settings.json` +`./config/plugins.js` -```json -{ - "provider": "aws-s3", - "providerOptions": { - "accessKeyId": "dev-key", - "secretAccessKey": "dev-secret", - "region": "aws-region", - "params": { - "Bucket": "my-bucket" +```js +module.exports = ({ env }) => ({ + // ... + upload: { + provider: "aws-s3", + providerOptions: { + accessKeyId: env('AWS_ACCESS_KEY_ID'), + secretAccessKey: env('AWS_ACCESS_SECRET'), + region: env('AWS_REGION'), + params: { + Bucket: env('AWS_BUCKET') + } } - } -} + }, + // ... +}); ``` ## Resources diff --git a/packages/strapi-provider-upload-cloudinary/README.md b/packages/strapi-provider-upload-cloudinary/README.md index 42d4804c29..35da67ff31 100644 --- a/packages/strapi-provider-upload-cloudinary/README.md +++ b/packages/strapi-provider-upload-cloudinary/README.md @@ -4,19 +4,25 @@ Your configuration is passed down to the cloudinary configuration. (e.g: `cloudinary.config(config)`). You can see the complete list of options [here](https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters) +See the [using a provider](https://strapi.io/documentation/v3.x/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://strapi.io/documentation/v3.x/concepts/configurations.html#environment-variables) for setting and using environment variables in your configs. + **Example** -`./extensions/upload/config/settings.json` +`./config/plugins.js` -```json -{ - "provider": "cloudinary", - "providerOptions": { - "cloud_name": "cloud-name", - "api_key": "api-key", - "api_secret": "api-secret" - } -} +```js +module.exports = ({ env }) => ({ + // ... + upload: { + provider: "cloudinary", + providerOptions: { + cloud_name: env('CLOUDINARY_NAME'), + api_key: env('CLOUDINARY_KEY'), + api_secret: env('CLOUDINARY_SECRET') + } + }, + // ... +}); ``` ## Resources diff --git a/packages/strapi-provider-upload-rackspace/README.md b/packages/strapi-provider-upload-rackspace/README.md index 40f0dc711f..3dc55f031f 100644 --- a/packages/strapi-provider-upload-rackspace/README.md +++ b/packages/strapi-provider-upload-rackspace/README.md @@ -4,19 +4,25 @@ Your configuration is passed down to the client initialization. (e.g: `createClient(config)`). The implementation is based on the package `pkgcloud`. You can read the docs [here](https://github.com/pkgcloud/pkgcloud#storage). +See the [using a provider](https://strapi.io/documentation/v3.x/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://strapi.io/documentation/v3.x/concepts/configurations.html#environment-variables) for setting and using environment variables in your configs. + **Example** -`./extensions/upload/config/settings.json` +`./config/plugins.js` -```json -{ - "provider": "rackspace", - "providerOptions": { - "username": "user-name", - "apiKey": "api-key", - "region": "IAD" - } -} +```js +module.exports = ({ env }) => ({ + // ... + upload: { + provider: "rackspace", + providerOptions: { + username: env('RACKSPACE_USERNAME'), + apiKey: env('RACKSPACE_KEY'), + region: env('RACKSPACE_REGION') + } + }, + // ... +}); ``` ## Resources