mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Merge pull request #11731 from strapi/fix/providerDocs
Fix provider config examples for v4
This commit is contained in:
commit
68af6a332e
@ -44,6 +44,7 @@ npm install strapi-provider-email-amazon-ses --save
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
email: {
|
email: {
|
||||||
|
config: {
|
||||||
provider: 'amazon-ses',
|
provider: 'amazon-ses',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
key: env('AWS_SES_KEY'),
|
key: env('AWS_SES_KEY'),
|
||||||
@ -55,6 +56,7 @@ module.exports = ({ env }) => ({
|
|||||||
defaultReplyTo: 'myemail@protonmail.com',
|
defaultReplyTo: 'myemail@protonmail.com',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -44,6 +44,7 @@ npm install strapi-provider-email-mailgun --save
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
email: {
|
email: {
|
||||||
|
config: {
|
||||||
provider: 'mailgun',
|
provider: 'mailgun',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
apiKey: env('MAILGUN_API_KEY'),
|
apiKey: env('MAILGUN_API_KEY'),
|
||||||
@ -55,6 +56,7 @@ module.exports = ({ env }) => ({
|
|||||||
defaultReplyTo: 'myemail@protonmail.com',
|
defaultReplyTo: 'myemail@protonmail.com',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -30,7 +30,9 @@ npm install strapi-provider-email-nodemailer --save
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
|
// ...
|
||||||
email: {
|
email: {
|
||||||
|
config: {
|
||||||
provider: 'nodemailer',
|
provider: 'nodemailer',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
host: env('SMTP_HOST', 'smtp.example.com'),
|
host: env('SMTP_HOST', 'smtp.example.com'),
|
||||||
@ -46,6 +48,8 @@ module.exports = ({ env }) => ({
|
|||||||
defaultReplyTo: 'hello@example.com',
|
defaultReplyTo: 'hello@example.com',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ npm install strapi-provider-email-sendgrid --save
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
email: {
|
email: {
|
||||||
|
config: {
|
||||||
provider: 'sendgrid',
|
provider: 'sendgrid',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
apiKey: env('SENDGRID_API_KEY'),
|
apiKey: env('SENDGRID_API_KEY'),
|
||||||
@ -54,6 +55,7 @@ module.exports = ({ env }) => ({
|
|||||||
defaultReplyTo: 'myemail@protonmail.com',
|
defaultReplyTo: 'myemail@protonmail.com',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -45,12 +45,14 @@ npm install strapi-provider-email-sendmail --save
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
email: {
|
email: {
|
||||||
|
config: {
|
||||||
provider: 'sendmail',
|
provider: 'sendmail',
|
||||||
settings: {
|
settings: {
|
||||||
defaultFrom: 'myemail@protonmail.com',
|
defaultFrom: 'myemail@protonmail.com',
|
||||||
defaultReplyTo: 'myemail@protonmail.com',
|
defaultReplyTo: 'myemail@protonmail.com',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -14,6 +14,7 @@ See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
upload: {
|
upload: {
|
||||||
|
config: {
|
||||||
provider: 'aws-s3',
|
provider: 'aws-s3',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
accessKeyId: env('AWS_ACCESS_KEY_ID'),
|
accessKeyId: env('AWS_ACCESS_KEY_ID'),
|
||||||
@ -24,6 +25,7 @@ module.exports = ({ env }) => ({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -16,6 +16,7 @@ See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
upload: {
|
upload: {
|
||||||
|
config: {
|
||||||
provider: 'cloudinary',
|
provider: 'cloudinary',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
cloud_name: env('CLOUDINARY_NAME'),
|
cloud_name: env('CLOUDINARY_NAME'),
|
||||||
@ -27,6 +28,7 @@ module.exports = ({ env }) => ({
|
|||||||
delete: {},
|
delete: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -6,15 +6,21 @@ This provider has only one parameter: `sizeLimit`.
|
|||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
`./extensions/upload/config/settings.json`
|
`./config/plugins.js`
|
||||||
|
|
||||||
```json
|
```js
|
||||||
{
|
module.exports = ({ env }) => ({
|
||||||
"provider": "local",
|
// ...
|
||||||
"providerOptions": {
|
upload: {
|
||||||
"sizeLimit": 100000
|
config: {
|
||||||
}
|
provider: 'local',
|
||||||
}
|
providerOptions: {
|
||||||
|
sizeLimit: 100000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
The `sizeLimit` parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware `maxFileSize` so the file can be sent and processed. Read more [here](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration)
|
The `sizeLimit` parameter must be a number. Be aware that the unit is in bytes, and the default is 1000000. When setting this value high, you should make sure to also configure the body parser middleware `maxFileSize` so the file can be sent and processed. Read more [here](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#configuration)
|
||||||
|
@ -14,6 +14,7 @@ See the [using a provider](https://docs.strapi.io/developer-docs/latest/plugins/
|
|||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
// ...
|
// ...
|
||||||
upload: {
|
upload: {
|
||||||
|
config: {
|
||||||
provider: 'rackspace',
|
provider: 'rackspace',
|
||||||
providerOptions: {
|
providerOptions: {
|
||||||
username: env('RACKSPACE_USERNAME'),
|
username: env('RACKSPACE_USERNAME'),
|
||||||
@ -22,6 +23,7 @@ module.exports = ({ env }) => ({
|
|||||||
container: env('RACKSPACE_CONTAINER'),
|
container: env('RACKSPACE_CONTAINER'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
// ...
|
// ...
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user