forked from EvanOxfeld/node-unzip
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
The S3 client for v3 of the SDK signature has changed when trying to create a read stream.
The signature has changed so that instead of
node-unzipper/lib/Open/index.js
Lines 86 to 92 in 7f83183
| stream: function(offset,length) { | |
| var d = {}; | |
| for (var key in params) | |
| d[key] = params[key]; | |
| d.Range = 'bytes='+offset+'-' + (length ? length : ''); | |
| return client.getObject(d).createReadStream(); | |
| } |
stream: function(offset,length) {
var d = {};
for (var key in params)
d[key] = params[key];
d.Range = 'bytes='+offset+'-' + (length ? length : '');
return new Promise(function(resolve,reject) {
client.getObject(d, function(err, data) {
if (err)
reject(err);
else
resolve(data.Body);
});
});
}, although it's unclear how to distinguish between a v2 client and a v3 client and if the caller would be happy with a Promise being returned instead of the stream directly.
If a v3 client is passed in, the following error is thrown in the current version of unzipper:
ERROR TypeError: client.getObject(...).createReadStream is not a function
nojimage, veimox, ddemydenko, obones and grumbling-tomveimoxchizr and veimox
Metadata
Metadata
Assignees
Labels
No labels