Uploading multiple files to AWS S3 using NodeJS
问题 I'm trying to upload all files within my directory to my S3 bucket using NodeJS. I'm able to upload one file at a time if I explicitly give the file path + literal string for the Key: field. Below is the script I'm using: var AWS = require('aws-sdk'), fs = require('fs'); // For dev purposes only AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); // reg ex to match var re = /\.txt$/; // ensure that this file is in the directory of the files you want to run the cronjob on //