@strapi/provider-upload-aws-s3 4.4.2 → 4.4.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 +16 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -124,6 +124,22 @@ module.exports = [
124
124
 
125
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.
126
126
 
127
+ ## Bucket CORS Configuration
128
+
129
+ If you are planning on uploading content like GIFs and videos to your S3 bucket, you will want to edit its CORS configuration so that thumbnails are properly shown in Strapi. To do so, open your Bucket on the AWS console and locate the _Cross-origin resource sharing (CORS)_ field under the _Permissions_ tab, then amend the policies by writing your own JSON configuration, or copying and pasting the following one:
130
+
131
+ ```json
132
+ [
133
+ {
134
+ "AllowedHeaders": ["*"],
135
+ "AllowedMethods": ["GET"],
136
+ "AllowedOrigins": ["YOUR STRAPI URL"],
137
+ "ExposeHeaders": [],
138
+ "MaxAgeSeconds": 3000
139
+ }
140
+ ]
141
+ ```
142
+
127
143
  ## Required AWS Policy Actions
128
144
 
129
145
  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.4.2",
3
+ "version": "4.4.4",
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 <=18.x.x",
45
45
  "npm": ">=6.0.0"
46
46
  },
47
- "gitHead": "7f6d6ace893538ad130882e17f91e8cb8822e8a3"
47
+ "gitHead": "02f7b3b65deab4f7db360141d6f87f4a6840170e"
48
48
  }