fix: fix zip extract

This commit is contained in:
tdurieux
2023-08-28 14:36:04 +02:00
parent d8de3f189a
commit ecfd69bd37
3 changed files with 14 additions and 9 deletions

14
package-lock.json generated
View File

@@ -19,7 +19,7 @@
"bullmq": "^2.3.2",
"compression": "^1.7.4",
"connect-redis": "^7.0.1",
"decompress-stream-to-s3": "^2.1.0",
"decompress-stream-to-s3": "^2.1.1",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-rate-limit": "^6.8.0",
@@ -3396,9 +3396,9 @@
}
},
"node_modules/decompress-stream-to-s3": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/decompress-stream-to-s3/-/decompress-stream-to-s3-2.1.0.tgz",
"integrity": "sha512-0hhZAGuSvnVdGt4K/BHMuOrpnAl0nzTzMMOsCip+TVHDVi5x4XQZAeQ1OOjYw1QjLFy0A83u4+EFG7uS46DTsw==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/decompress-stream-to-s3/-/decompress-stream-to-s3-2.1.1.tgz",
"integrity": "sha512-whIgoOhIFJhn9NDdNBHHyQsN6EumSu7UUoaW94nWrf3JZ2wUdmPOalemCQ20zdxhqzhwKfLDv7AqtxTAzePoxA==",
"dependencies": {
"@aws-sdk/client-s3": "^3.374.0",
"debug": "^4.3.4",
@@ -9169,9 +9169,9 @@
}
},
"decompress-stream-to-s3": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/decompress-stream-to-s3/-/decompress-stream-to-s3-2.1.0.tgz",
"integrity": "sha512-0hhZAGuSvnVdGt4K/BHMuOrpnAl0nzTzMMOsCip+TVHDVi5x4XQZAeQ1OOjYw1QjLFy0A83u4+EFG7uS46DTsw==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/decompress-stream-to-s3/-/decompress-stream-to-s3-2.1.1.tgz",
"integrity": "sha512-whIgoOhIFJhn9NDdNBHHyQsN6EumSu7UUoaW94nWrf3JZ2wUdmPOalemCQ20zdxhqzhwKfLDv7AqtxTAzePoxA==",
"requires": {
"@aws-sdk/client-s3": "^3.374.0",
"debug": "^4.3.4",

View File

@@ -40,7 +40,7 @@
"bullmq": "^2.3.2",
"compression": "^1.7.4",
"connect-redis": "^7.0.1",
"decompress-stream-to-s3": "^2.1.0",
"decompress-stream-to-s3": "^2.1.1",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-rate-limit": "^6.8.0",

View File

@@ -251,7 +251,12 @@ export default class S3Storage implements StorageBase {
},
maxParallel: 10,
});
pipeline(data, toS3, () => {})
pipeline(data, toS3, (err) => {
if (err) {
return reject(err);
}
resolve();
})
.on("finish", resolve)
.on("error", reject);
});