@strapi/provider-upload-aws-s3 4.2.0-beta.1 → 4.2.0-beta.4

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.
Files changed (2) hide show
  1. package/README.md +26 -5
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -21,11 +21,13 @@ yarn add @strapi/provider-upload-aws-s3
21
21
  npm install @strapi/provider-upload-aws-s3 --save
22
22
  ```
23
23
 
24
- ## Configurations
24
+ ## Configuration
25
25
 
26
- 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)
26
+ - `provider` defines the name of the provider
27
+ - `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)
28
+ - `actionOptions` is passed directly to the parameters to each method respectively. You can find the complete list of [upload/ uploadStream 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)
27
29
 
28
- 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.
30
+ 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 how environment variables are used in Strapi, please refer to the [documentation about environment variables](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#environment-variables).
29
31
 
30
32
  ### Provider Configuration
31
33
 
@@ -45,6 +47,11 @@ module.exports = ({ env }) => ({
45
47
  Bucket: env('AWS_BUCKET'),
46
48
  },
47
49
  },
50
+ actionOptions: {
51
+ upload: {},
52
+ uploadStream: {},
53
+ delete: {},
54
+ },
48
55
  },
49
56
  },
50
57
  // ...
@@ -67,8 +74,20 @@ module.exports = [
67
74
  useDefaults: true,
68
75
  directives: {
69
76
  'connect-src': ["'self'", 'https:'],
70
- 'img-src': ["'self'", 'data:', 'blob:', 'yourBucketName.s3.yourRegion.amazonaws.com'],
71
- 'media-src': ["'self'", 'data:', 'blob:', 'yourBucketName.s3.yourRegion.amazonaws.com'],
77
+ 'img-src': [
78
+ "'self'",
79
+ 'data:',
80
+ 'blob:',
81
+ 'dl.airtable.com',
82
+ 'yourBucketName.s3.yourRegion.amazonaws.com',
83
+ ],
84
+ 'media-src': [
85
+ "'self'",
86
+ 'data:',
87
+ 'blob:',
88
+ 'dl.airtable.com',
89
+ 'yourBucketName.s3.yourRegion.amazonaws.com',
90
+ ],
72
91
  upgradeInsecureRequests: null,
73
92
  },
74
93
  },
@@ -78,6 +97,8 @@ module.exports = [
78
97
  ];
79
98
  ```
80
99
 
100
+ 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.
101
+
81
102
  ## Required AWS Policy Actions
82
103
 
83
104
  These are the minimum amount of permissions needed for this provider to work.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-upload-aws-s3",
3
- "version": "4.2.0-beta.1",
3
+ "version": "4.2.0-beta.4",
4
4
  "description": "AWS S3 provider for strapi upload",
5
5
  "keywords": [
6
6
  "upload",
@@ -41,8 +41,8 @@
41
41
  "lodash": "4.17.21"
42
42
  },
43
43
  "engines": {
44
- "node": ">=12.22.0 <=16.x.x",
44
+ "node": ">=14.19.1 <=16.x.x",
45
45
  "npm": ">=6.0.0"
46
46
  },
47
- "gitHead": "4fa2804f35e15ed72dfd309fb5bb1c4dba18932f"
47
+ "gitHead": "5caff35a30e33b7a660eb946299f9e3d2d35b2b8"
48
48
  }