mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 11:17:42 +00:00
Merge branch 'master' into fix/save-up-settings
This commit is contained in:
commit
2c2800dfda
@ -1,27 +1,24 @@
|
|||||||
# strapi-provider-email-amazon-ses
|
# @strapi/provider-email-amazon-ses
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [License](LICENSE)
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
- [Strapi website](https://strapi.io/)
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You need to have the plugin `strapi-plugin-email` installed in you Strapi project.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# using yarn
|
# using yarn
|
||||||
yarn add strapi-provider-email-amazon-ses
|
yarn add @strapi/provider-email-amazon-ses
|
||||||
|
|
||||||
# using npm
|
# using npm
|
||||||
npm install strapi-provider-email-amazon-ses --save
|
npm install @strapi/provider-email-amazon-ses --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@ -38,7 +35,7 @@ npm install strapi-provider-email-amazon-ses --save
|
|||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
**Path -** `config/plugins.js`
|
**Path -** `./config/plugins.js`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
module.exports = ({ env }) => ({
|
module.exports = ({ env }) => ({
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
# strapi-provider-email-mailgun
|
# @strapi/provider-email-mailgun
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [License](LICENSE)
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
- [Strapi website](https://strapi.io/)
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You need to have the plugin `strapi-plugin-email` installed in you Strapi project.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# using yarn
|
# using yarn
|
||||||
yarn add strapi-provider-email-mailgun
|
yarn add @strapi/provider-email-mailgun
|
||||||
|
|
||||||
# using npm
|
# using npm
|
||||||
npm install strapi-provider-email-mailgun --save
|
npm install @strapi/provider-email-mailgun --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
@ -42,8 +42,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
16
packages/providers/email-nodemailer/.editorconfig
Normal file
16
packages/providers/email-nodemailer/.editorconfig
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[{package.json,*.yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
96
packages/providers/email-nodemailer/.gitignore
vendored
Normal file
96
packages/providers/email-nodemailer/.gitignore
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
############################
|
||||||
|
# OS X
|
||||||
|
############################
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
Icon
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
._*
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Linux
|
||||||
|
############################
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Windows
|
||||||
|
############################
|
||||||
|
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Packages
|
||||||
|
############################
|
||||||
|
|
||||||
|
*.7z
|
||||||
|
*.csv
|
||||||
|
*.dat
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.seed
|
||||||
|
*.so
|
||||||
|
*.swo
|
||||||
|
*.swp
|
||||||
|
*.swn
|
||||||
|
*.swm
|
||||||
|
*.out
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Logs and databases
|
||||||
|
############################
|
||||||
|
|
||||||
|
.tmp
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Misc.
|
||||||
|
############################
|
||||||
|
|
||||||
|
*#
|
||||||
|
.idea
|
||||||
|
nbproject
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Node.js
|
||||||
|
############################
|
||||||
|
|
||||||
|
lib-cov
|
||||||
|
lcov.info
|
||||||
|
pids
|
||||||
|
logs
|
||||||
|
results
|
||||||
|
build
|
||||||
|
node_modules
|
||||||
|
.node_history
|
||||||
|
package-lock.json
|
||||||
|
|
100
packages/providers/email-nodemailer/.npmignore
Normal file
100
packages/providers/email-nodemailer/.npmignore
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
############################
|
||||||
|
# OS X
|
||||||
|
############################
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
Icon
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
._*
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Linux
|
||||||
|
############################
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Windows
|
||||||
|
############################
|
||||||
|
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Packages
|
||||||
|
############################
|
||||||
|
|
||||||
|
*.7z
|
||||||
|
*.csv
|
||||||
|
*.dat
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.seed
|
||||||
|
*.so
|
||||||
|
*.swo
|
||||||
|
*.swp
|
||||||
|
*.swn
|
||||||
|
*.swm
|
||||||
|
*.out
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Logs and databases
|
||||||
|
############################
|
||||||
|
|
||||||
|
.tmp
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Misc.
|
||||||
|
############################
|
||||||
|
|
||||||
|
*#
|
||||||
|
ssl
|
||||||
|
.editorconfig
|
||||||
|
.gitattributes
|
||||||
|
.idea
|
||||||
|
nbproject
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Node.js
|
||||||
|
############################
|
||||||
|
|
||||||
|
lib-cov
|
||||||
|
lcov.info
|
||||||
|
pids
|
||||||
|
logs
|
||||||
|
results
|
||||||
|
build
|
||||||
|
node_modules
|
||||||
|
.node_history
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Tests
|
||||||
|
############################
|
||||||
|
|
||||||
|
test
|
||||||
|
tests
|
||||||
|
__tests__
|
||||||
|
jest.config.js
|
@ -1,27 +1,24 @@
|
|||||||
# strapi-provider-email-nodemailer
|
# @strapi/provider-email-nodemailer
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [License](LICENSE)
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
- [Strapi website](https://strapi.io/)
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You need to have the plugin `strapi-plugin-email` installed in your Strapi project.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# using yarn
|
# using yarn
|
||||||
yarn add strapi-provider-email-nodemailer
|
yarn add @strapi/provider-email-nodemailer
|
||||||
|
|
||||||
# using npm
|
# using npm
|
||||||
npm install strapi-provider-email-nodemailer --save
|
npm install @strapi/provider-email-nodemailer --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -55,8 +55,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
# strapi-provider-email-sendgrid
|
# @strapi/provider-email-sendgrid
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [License](LICENSE)
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
- [Strapi website](https://strapi.io/)
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You need to have the plugin `strapi-plugin-email` installed in you Strapi project.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# using yarn
|
# using yarn
|
||||||
yarn add strapi-provider-email-sendgrid
|
yarn add @strapi/provider-email-sendgrid
|
||||||
|
|
||||||
# using npm
|
# using npm
|
||||||
npm install strapi-provider-email-sendgrid --save
|
npm install @strapi/provider-email-sendgrid --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
@ -42,8 +42,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
# strapi-provider-email-sendmail
|
# @strapi/provider-email-sendmail
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
- [License](LICENSE)
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
- [Strapi website](https://strapi.io/)
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
You need to have the plugin `strapi-plugin-email` installed in you Strapi project.
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# using yarn
|
# using yarn
|
||||||
yarn add strapi-provider-email-sendmail
|
yarn add @strapi/provider-email-sendmail
|
||||||
|
|
||||||
# using npm
|
# using npm
|
||||||
npm install strapi-provider-email-sendmail --save
|
npm install @strapi/provider-email-sendmail --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
@ -41,8 +41,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,25 @@
|
|||||||
# strapi-provider-upload-aws-s3
|
# @strapi/provider-upload-aws-s3
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [Strapi website](https://strapi.io/)
|
||||||
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# using yarn
|
||||||
|
yarn add @strapi/provider-upload-aws-s3
|
||||||
|
|
||||||
|
# using npm
|
||||||
|
npm install @strapi/provider-upload-aws-s3 --save
|
||||||
|
```
|
||||||
|
|
||||||
## Configurations
|
## Configurations
|
||||||
|
|
||||||
@ -6,7 +27,7 @@ Your configuration is passed down to the provider. (e.g: `new AWS.S3(config)`).
|
|||||||
|
|
||||||
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 [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.
|
||||||
|
|
||||||
**Example**
|
### Provider Configuration
|
||||||
|
|
||||||
`./config/plugins.js`
|
`./config/plugins.js`
|
||||||
|
|
||||||
@ -30,11 +51,37 @@ module.exports = ({ env }) => ({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Security Middleware Configuration
|
||||||
|
|
||||||
|
Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation.
|
||||||
|
|
||||||
|
`./config/middlewares.js`
|
||||||
|
|
||||||
|
````js
|
||||||
|
module.exports = [
|
||||||
|
// ...
|
||||||
|
{
|
||||||
|
name: "strapi::security",
|
||||||
|
config: {
|
||||||
|
contentSecurityPolicy: {
|
||||||
|
useDefaults: true,
|
||||||
|
directives: {
|
||||||
|
"connect-src": ["'self'", "https:"],
|
||||||
|
"img-src": ["'self'", "data:", "blob:", "yourBucketName.s3.yourRegion.amazonaws.com"],
|
||||||
|
"media-src": ["'self'", "data:", "blob:", "yourBucketName.s3.yourRegion.amazonaws.com"],
|
||||||
|
upgradeInsecureRequests: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
];
|
||||||
|
|
||||||
## Required AWS Policy Actions
|
## Required AWS Policy Actions
|
||||||
|
|
||||||
These are the minimum amount of permissions needed for this provider to work.
|
These are the minimum amount of permissions needed for this provider to work.
|
||||||
|
|
||||||
```
|
```json
|
||||||
"Action": [
|
"Action": [
|
||||||
"s3:PutObject",
|
"s3:PutObject",
|
||||||
"s3:GetObject",
|
"s3:GetObject",
|
||||||
@ -42,14 +89,4 @@ These are the minimum amount of permissions needed for this provider to work.
|
|||||||
"s3:DeleteObject",
|
"s3:DeleteObject",
|
||||||
"s3:PutObjectAcl"
|
"s3:PutObjectAcl"
|
||||||
],
|
],
|
||||||
```
|
````
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
- [License](LICENSE)
|
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
|
||||||
|
@ -43,8 +43,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,25 @@
|
|||||||
# strapi-provider-upload-cloudinary
|
# @strapi/provider-upload-cloudinary
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [Strapi website](https://strapi.io/)
|
||||||
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# using yarn
|
||||||
|
yarn add @strapi/provider-upload-cloudinary
|
||||||
|
|
||||||
|
# using npm
|
||||||
|
npm install @strapi/provider-upload-cloudinary --save
|
||||||
|
```
|
||||||
|
|
||||||
## Configurations
|
## Configurations
|
||||||
|
|
||||||
@ -8,7 +29,7 @@ Your configuration is passed down to the cloudinary configuration. (e.g: `cloudi
|
|||||||
|
|
||||||
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 [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.
|
||||||
|
|
||||||
**Example**
|
### Provider Configuration
|
||||||
|
|
||||||
`./config/plugins.js`
|
`./config/plugins.js`
|
||||||
|
|
||||||
@ -33,12 +54,29 @@ module.exports = ({ env }) => ({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Resources
|
### Security Middleware Configuration
|
||||||
|
|
||||||
- [License](LICENSE)
|
Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation.
|
||||||
|
|
||||||
## Links
|
`./config/middlewares.js`
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
```js
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
module.exports = [
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
// ...
|
||||||
|
{
|
||||||
|
name: 'strapi::security',
|
||||||
|
config: {
|
||||||
|
contentSecurityPolicy: {
|
||||||
|
useDefaults: true,
|
||||||
|
directives: {
|
||||||
|
'connect-src': ["'self'", 'https:'],
|
||||||
|
'img-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'],
|
||||||
|
'media-src': ["'self'", 'data:', 'blob:', 'res.cloudinary.com'],
|
||||||
|
upgradeInsecureRequests: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
];
|
||||||
|
```
|
||||||
|
@ -43,8 +43,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,31 @@
|
|||||||
# strapi-provider-upload-local
|
# @strapi/provider-upload-local
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [Strapi website](https://strapi.io/)
|
||||||
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# using yarn
|
||||||
|
yarn add @strapi/provider-upload-local
|
||||||
|
|
||||||
|
# using npm
|
||||||
|
npm install @strapi/provider-upload-local --save
|
||||||
|
```
|
||||||
|
|
||||||
## Configurations
|
## Configurations
|
||||||
|
|
||||||
This provider has only one parameter: `sizeLimit`.
|
This provider has only one parameter: `sizeLimit`.
|
||||||
|
|
||||||
**Example**
|
### Provider Configuration
|
||||||
|
|
||||||
`./config/plugins.js`
|
`./config/plugins.js`
|
||||||
|
|
||||||
@ -25,12 +46,6 @@ module.exports = ({ env }) => ({
|
|||||||
|
|
||||||
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)
|
||||||
|
|
||||||
## Resources
|
### Security Middleware Configuration
|
||||||
|
|
||||||
- [License](LICENSE)
|
Special configuration of the Strapi Security Middleware is not required on this provider since the default configuration allows loading images and media from `"'self'"`.
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
|
||||||
|
@ -40,8 +40,5 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=16.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
|
||||||
"strapi": {
|
|
||||||
"isProvider": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,25 @@
|
|||||||
# strapi-provider-upload-rackspace
|
# @strapi/provider-upload-rackspace
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [LICENSE](LICENSE)
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [Strapi website](https://strapi.io/)
|
||||||
|
- [Strapi documentation](https://docs.strapi.io)
|
||||||
|
- [Strapi community on Discord](https://discord.strapi.io)
|
||||||
|
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# using yarn
|
||||||
|
yarn add @strapi/provider-upload-rackspace
|
||||||
|
|
||||||
|
# using npm
|
||||||
|
npm install @strapi/provider-upload-rackspace --save
|
||||||
|
```
|
||||||
|
|
||||||
## Configurations
|
## Configurations
|
||||||
|
|
||||||
@ -6,7 +27,7 @@ Your configuration is passed down to the client initialization. (e.g: `createCli
|
|||||||
|
|
||||||
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 [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.
|
||||||
|
|
||||||
**Example**
|
### Provider Configuration
|
||||||
|
|
||||||
`./config/plugins.js`
|
`./config/plugins.js`
|
||||||
|
|
||||||
@ -28,12 +49,29 @@ module.exports = ({ env }) => ({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Resources
|
### Security Middleware Configuration
|
||||||
|
|
||||||
- [License](LICENSE)
|
Due to the default settings in the Strapi Security Middleware you will need to modify the `contentSecurityPolicy` settings to properly see thumbnail previews in the Media Library. You should replace `strapi::security` string with the object bellow instead as explained in the [middleware configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html#loading-order) documentation.
|
||||||
|
|
||||||
## Links
|
`./config/middlewares.js`
|
||||||
|
|
||||||
- [Strapi website](https://strapi.io/)
|
```js
|
||||||
- [Strapi community on Slack](https://slack.strapi.io)
|
module.exports = [
|
||||||
- [Strapi news on Twitter](https://twitter.com/strapijs)
|
// ...
|
||||||
|
{
|
||||||
|
name: 'strapi::security',
|
||||||
|
config: {
|
||||||
|
contentSecurityPolicy: {
|
||||||
|
useDefaults: true,
|
||||||
|
directives: {
|
||||||
|
'connect-src': ["'self'", 'https:'],
|
||||||
|
'img-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'],
|
||||||
|
'media-src': ["'self'", 'data:', 'blob:', 'storage.clouddrive.com'],
|
||||||
|
upgradeInsecureRequests: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// ...
|
||||||
|
];
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user