daraosn / node-zip

217 stars 38 forks source link

ZIP Contents of Lambda TMP Directory - Files are 0,1,2,3 Folders Deep #23

Open webnumbers opened 7 years ago

webnumbers commented 7 years ago

Hi everyone.

Thank you in advance for all your ideas and suggestions.

We copy 10MB (approx 2,000 files) from the pre-installed "files" folder in Lambda to its /tmp directory. We then download dozens of files from S3 to the same /tmp directory.

We have a hierarchy of multiple folders. Some files are in root. Some inside a folder. Some inside a folder inside a folder etc.

We don't know the file names in advance or their position.

We have a maximum of 3 folders deep.

Our goal is to zip up the contents of the /tmp directory to create an Archive.zip file ready to be uploaded to S3.

By carrying the majority of files locally we save the time and bandwidth of downloading over 2,000 files each time we run the function.

We have worked with a number of node modules but they don't seem capable of processing this multi level hierarchy of files.

Any help would be much appreciated.

Thank you.