Docs: Update provider readme files

This commit is contained in:
Gustav Hansen 2022-03-25 11:47:02 +01:00
parent 2edd2ae00c
commit b3f3962983
3 changed files with 23 additions and 11 deletions

View File

@ -21,11 +21,13 @@ yarn add @strapi/provider-upload-aws-s3
npm install @strapi/provider-upload-aws-s3 --save
```
## Configurations
## Configuration
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)
- `provider` defines the name of the provider
- `providerOptions` is passed down during the construction of the provider. (ex: `new AWS.S3(config)`). [Complete list of options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property).
- `actionOptions` is passed directly to the parameters to each method respectively. You can see the complete list of [upload options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property) and [delete options](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#deleteObject-property)
See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs.
See the [documentation about using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) for information on installing and using a provider. To understand the usage environment variables in Strapi, please refer to the [documentation of environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables).
### Provider Configuration
@ -45,6 +47,10 @@ module.exports = ({ env }) => ({
Bucket: env('AWS_BUCKET'),
},
},
actionOptions: {
upload: {},
delete: {},
},
},
},
// ...

View File

@ -21,13 +21,13 @@ yarn add @strapi/provider-upload-cloudinary
npm install @strapi/provider-upload-cloudinary --save
```
## Configurations
## Configuration
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)
- `provider` defines the name of the provider
- `providerOptions` is passed down during the construction of the provider. (ex: `cloudinary.config`). [Complete list of options](https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters).
- `actionOptions` is passed directly to each method respectively allowing for custom options. You can see the complete list of [upload options](https://cloudinary.com/documentation/image_upload_api_reference#upload_optional_parameters) and [delete options](https://cloudinary.com/documentation/image_upload_api_reference#destroy_optional_parameters)
`actionOptions` are passed directly to the upload and delete functions respectively allowing for custom options such as folder, type, etc. You can see the complete list of upload options [here](https://cloudinary.com/documentation/image_upload_api_reference#upload_optional_parameters) and delete options [here](https://cloudinary.com/documentation/image_upload_api_reference#destroy_optional_parameters)
See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs.
See the [documentation about using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) for information on installing and using a provider. To understand the usage environment variables in Strapi, please refer to the [documentation of environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables).
### Provider Configuration

View File

@ -21,11 +21,13 @@ yarn add @strapi/provider-upload-rackspace
npm install @strapi/provider-upload-rackspace --save
```
## Configurations
## Configuration
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).
- `provider` defines the name of the provider
- `providerOptions` is passed down during the construction of the provider. (ex: `createClient(config)`). [Complete list of options](https://github.com/pkgcloud/pkgcloud/blob/master/docs/providers/rackspace/README.md). The implementation is based on the package `pkgcloud`. [Documentation](https://github.com/pkgcloud/pkgcloud#storage).
- `actionOptions` is passed directly to each method respectively allowing for custom options. You can see the complete list of [upload options](https://github.com/pkgcloud/pkgcloud#upload-a-file) and [delete options](https://github.com/pkgcloud/pkgcloud/blob/master/docs/providers/rackspace/storage.md#clientremovefilecontainer-file-functionerr-result--)
See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) documentation for information on installing and using a provider. And see the [environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables) for setting and using environment variables in your configs.
See the [documentation about using a provider](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider) for information on installing and using a provider. To understand the usage environment variables in Strapi, please refer to the [documentation of environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables).
### Provider Configuration
@ -43,6 +45,10 @@ module.exports = ({ env }) => ({
region: env('RACKSPACE_REGION'),
container: env('RACKSPACE_CONTAINER'),
},
actionOptions: {
upload: {},
delete: {},
},
},
},
// ...