@strapi/provider-upload-aws-s3 4.2.3 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -58,6 +58,31 @@ module.exports = ({ env }) => ({
|
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
#### Configuration for S3 compatible services
|
|
62
|
+
|
|
63
|
+
This plugin may work with S3 compatible services by using the `endpoint` option instead of `region`. Scaleway example:
|
|
64
|
+
`./config/plugins.js`
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
module.exports = ({ env }) => ({
|
|
68
|
+
// ...
|
|
69
|
+
upload: {
|
|
70
|
+
config: {
|
|
71
|
+
provider: 'aws-s3',
|
|
72
|
+
providerOptions: {
|
|
73
|
+
accessKeyId: env('SCALEWAY_ACCESS_KEY_ID'),
|
|
74
|
+
secretAccessKey: env('SCALEWAY_ACCESS_SECRET'),
|
|
75
|
+
endpoint: env('SCALEWAY_ENDPOINT'), // e.g. "s3.fr-par.scw.cloud"
|
|
76
|
+
params: {
|
|
77
|
+
Bucket: env('SCALEWAY_BUCKET'),
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
// ...
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
61
86
|
### Security Middleware Configuration
|
|
62
87
|
|
|
63
88
|
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.
|
|
@@ -96,6 +121,7 @@ module.exports = [
|
|
|
96
121
|
// ...
|
|
97
122
|
];
|
|
98
123
|
```
|
|
124
|
+
|
|
99
125
|
If you use dots in your bucket name, the url of the ressource is in directory style (`s3.yourRegion.amazonaws.com/your.bucket.name/image.jpg`) instead of `yourBucketName.s3.yourRegion.amazonaws.com/image.jpg`. Then only add `s3.yourRegion.amazonaws.com` to img-src and media-src directives.
|
|
100
126
|
|
|
101
127
|
## Required AWS Policy Actions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/provider-upload-aws-s3",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "AWS S3 provider for strapi upload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"upload",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"node": ">=14.19.1 <=16.x.x",
|
|
45
45
|
"npm": ">=6.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "74a2b908df75bc8001d72f9dc8571c4b7a2da337"
|
|
48
48
|
}
|