Skip to content

Commit e141210

Browse files
committed
2 parents 60ab944 + 88bc995 commit e141210

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@aws-sdk/client-s3": "^3.279.0",
20+
"@aws-sdk/node-http-handler": "^3.279.0",
2021
"adform-upload-tool": "^1.0.4",
2122
"axios": "^1.3.4",
2223
"chalk": "^4.1.2",

src/target/mm-preview.js

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const path = require('path');
88
const fs = require('fs');
99
const globPromise = require('glob-promise');
1010
const { S3Client, PutObjectCommand } = require('@aws-sdk/client-s3');
11+
const { NodeHttpHandler } = require("@aws-sdk/node-http-handler");
1112
const cliProgress = require('cli-progress');
1213

1314
const mime = require('mime-types');
@@ -65,6 +66,13 @@ const preview = {
6566
accessKeyId: data.accessKeyId,
6667
secretAccessKey: data.secretAccessKey,
6768
},
69+
requestHandler: new NodeHttpHandler({
70+
socketTimeout: 3000,
71+
timeoutByRequestType: {
72+
default: 3000
73+
},
74+
maxSockets: 200 // Increase from default 50
75+
})
6876
});
6977

7078
const allFiles = await globPromise(`${data.inputDir.replace(/\\/g, '/')}/**/*`);

0 commit comments

Comments
 (0)