@strapi/provider-upload-aws-s3 4.15.5-alpha.5 → 4.15.5

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 +43 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -171,7 +171,7 @@ module.exports = [
171
171
  ];
172
172
  ```
173
173
 
174
- 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.
174
+ If you use dots in your bucket name, the url of the resource is in directory style (`s3.yourRegion.amazonaws.com/your.bucket.name/image.jpg`) instead of `yourBucketName.s3.yourRegion.amazonaws.com/image.jpg` so in that case the img-src and media-src directives to add will be `s3.yourRegion.amazonaws.com` without the bucket name in the url.
175
175
 
176
176
  ## Bucket CORS Configuration
177
177
 
@@ -202,3 +202,45 @@ These are the minimum amount of permissions needed for this provider to work.
202
202
  "s3:PutObjectAcl"
203
203
  ],
204
204
  ```
205
+
206
+ ## Update to AWS SDK V3 and URL Format Change
207
+
208
+ In the recent update of the `@strapi/provider-upload-aws-s3` plugin, we have transitioned from AWS SDK V2 to AWS SDK V3. This significant update brings along a change in the format of the URLs used in Amazon S3 services.
209
+
210
+ ### Understanding the New URL Format
211
+
212
+ AWS SDK V3 adopts the virtual-hosted–style URI format for S3 URLs. This format is recommended by AWS and is likely to become required in the near future, as the path-style URI is being deprecated. More details on this format can be found in the [AWS User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access).
213
+
214
+ ### Why the Change?
215
+
216
+ The move to virtual-hosted–style URIs aligns with AWS's recommendation and future-proofing strategies. For an in-depth understanding of AWS's decision behind this transition, you can refer to their detailed post [here](https://aws.amazon.com/es/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/).
217
+
218
+ ### Configuring Your Strapi Application
219
+
220
+ If you wish to continue using the plugin with Strapi 4.15.x versions or newer without changing your URL format, it's possible to specify your desired URL format directly in the plugin's configuration. Below is an example configuration highlighting the critical `baseUrl` property:
221
+
222
+ ```javascript
223
+ upload: {
224
+ config: {
225
+ provider: 'aws-s3',
226
+ providerOptions: {
227
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID,
228
+ secretAccessKey: process.env.AWS_ACCESS_SECRET,
229
+ region: process.env.AWS_REGION,
230
+ baseUrl: `https://s3.${region}.amazonaws.com/${bucket}`, // This line sets the custom url format
231
+ params: {
232
+ ACL: process.env.AWS_ACL || 'public-read',
233
+ signedUrlExpires: process.env.AWS_SIGNED_URL_EXPIRES || 15 * 60,
234
+ Bucket: process.env.AWS_BUCKET,
235
+ },
236
+ },
237
+ actionOptions: {
238
+ upload: {},
239
+ uploadStream: {},
240
+ delete: {},
241
+ },
242
+ },
243
+ }
244
+ ```
245
+
246
+ This configuration ensures compatibility with the updated AWS SDK while providing flexibility in URL format selection, catering to various user needs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/provider-upload-aws-s3",
3
- "version": "4.15.5-alpha.5",
3
+ "version": "4.15.5",
4
4
  "description": "AWS S3 provider for strapi upload",
5
5
  "keywords": [
6
6
  "upload",
@@ -53,14 +53,14 @@
53
53
  "lodash": "4.17.21"
54
54
  },
55
55
  "devDependencies": {
56
- "@strapi/pack-up": "4.15.5-alpha.5",
56
+ "@strapi/pack-up": "4.15.5",
57
57
  "@types/jest": "29.5.2",
58
- "eslint-config-custom": "4.15.5-alpha.5",
59
- "tsconfig": "4.15.5-alpha.5"
58
+ "eslint-config-custom": "4.15.5",
59
+ "tsconfig": "4.15.5"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=18.0.0 <=20.x.x",
63
63
  "npm": ">=6.0.0"
64
64
  },
65
- "gitHead": "afe9e1825429e5d421311cedb027d109edcd401a"
65
+ "gitHead": "dc96169c3f41dab4ab75d828d3fb39dd1a2dae27"
66
66
  }