Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zipToFileFragments: maxFileCount not produced results as expected? #46

Open
MarkSkillen opened this issue Dec 11, 2020 · 0 comments
Open

Comments

@MarkSkillen
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant