@opengis/fastify-table 1.4.77 → 1.4.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "1.4.77",
3
+ "version": "1.4.78",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [
@@ -32,7 +32,8 @@
32
32
  "start": "node --env-file=.env server"
33
33
  },
34
34
  "dependencies": {
35
- "@aws-sdk/client-s3": "3.554.0",
35
+ "@aws-sdk/client-s3": "3.879.0",
36
+ "@aws-sdk/lib-storage": "3.879.0",
36
37
  "@fastify/http-proxy": "11.1.2",
37
38
  "@fastify/multipart": "9.0.3",
38
39
  "@fastify/rate-limit": "10.3.0",
@@ -1,6 +1,6 @@
1
1
  import {
2
- PutObjectCommand,
3
- } from '@aws-sdk/client-s3';
2
+ Upload,
3
+ } from '@aws-sdk/lib-storage';
4
4
 
5
5
  import client from '../client.js';
6
6
 
@@ -20,6 +20,7 @@ const uploadFile = (s3Settings) => async (fp, data) => {
20
20
  try {
21
21
  const s3Client = client.getS3Client(s3Settings);
22
22
  const bucketName = s3Settings.containerName;
23
+
23
24
  const bucketParams = {
24
25
  Bucket: bucketName,
25
26
  Key: filepath,
@@ -27,7 +28,14 @@ const uploadFile = (s3Settings) => async (fp, data) => {
27
28
  ContentType: type,
28
29
  Body: validData,
29
30
  };
30
- const res = await s3Client.send(new PutObjectCommand(bucketParams));
31
+
32
+ const parallelUpload = new Upload({
33
+ client: s3Client,
34
+ params: bucketParams,
35
+ });
36
+
37
+ const res = await parallelUpload.done();
38
+ // const res = await s3Client.send(new PutObjectCommand(bucketParams));
31
39
  return res; // For unit tests.
32
40
  }
33
41
  catch (err) {