Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to download array of files from aws s3 using aws sdk in nodejs

function listFiles(cb) {
    s3.stuff(params, cb);
}
function downlaodFile(key, cb) {
    s3.stuff(key, cb);
}
listFiles(function (err, fileKeys) {
    if (err) {
        throw err;//don't really but this is just an example
    }
    async.each(fileKeys, downloadFile, function done(err) {
        if (err) {
            throw err;
        }
    });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #download #array #files #aws #aws #sdk #nodejs
ADD COMMENT
Topic
Name
6+8 =