You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having read through the readme, I'm looking to utilise the "Zip fragments to local file system with the filename pattern with a maximum file count" process.
As per the directions, I'm using the maxFileCount parameter but I'm not seeing it produce the expected results.
E.g
I have the following snippet:
zipper.zipToFileFragments ({
s3FolderName:'folder1'
,startKey: null
,zipFileName: './myLocalFile.zip'
,maxFileCount: 1
}, function(err,results){
if(err)
console.error(err);
else{
if(results.length > 0) {
var result = results[results.length - 1];
var lastFile = result.zippedFiles[result.zippedFiles.length - 1];
if (lastFile)
console.log('last key ', lastFile.Key); // next time start from here
}
}
});
My S3 bucket folder contains 3 files, and I wanted to test this out to create 3 zips locally, with one file in each zip, however I always seem to get just one zip with all the files in it. I've tested this in other S3 buckets with more files and altered this maxFileCount value, but every run puts all files in one zip - I'd expect this to produce multiple zips each contain the number of files specified as above, again based off of the readme.
Could anyone please advise?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Having read through the readme, I'm looking to utilise the "Zip fragments to local file system with the filename pattern with a maximum file count" process.
As per the directions, I'm using the maxFileCount parameter but I'm not seeing it produce the expected results.
E.g
I have the following snippet:
zipper.zipToFileFragments ({
s3FolderName:'folder1'
,startKey: null
,zipFileName: './myLocalFile.zip'
,maxFileCount: 1
}, function(err,results){
if(err)
console.error(err);
else{
if(results.length > 0) {
var result = results[results.length - 1];
var lastFile = result.zippedFiles[result.zippedFiles.length - 1];
if (lastFile)
console.log('last key ', lastFile.Key); // next time start from here
}
}
});
My S3 bucket folder contains 3 files, and I wanted to test this out to create 3 zips locally, with one file in each zip, however I always seem to get just one zip with all the files in it. I've tested this in other S3 buckets with more files and altered this maxFileCount value, but every run puts all files in one zip - I'd expect this to produce multiple zips each contain the number of files specified as above, again based off of the readme.
Could anyone please advise?
Thanks in advance!
The text was updated successfully, but these errors were encountered: