gulp-s3 icon indicating copy to clipboard operation
gulp-s3 copied to clipboard

Adding retries option

Open ken210 opened this issue 10 years ago • 1 comments

Hello! First of all i wish to thank you guys for the great project.

Sometimes, when you got any problem with your network, and your upload fails, you can't retry it. So I added the retries option that allows you to set how many times you wish gulp-s3 will retry to send your file.

var s3 = require("gulp-s3");
var aws = {
  "key": "AKIAI3Z7CUAFHG53DMJA",
  "secret": "acYxWRu5RRa6CwzQuhdXEfTpbQA+1XQJ7Z1bGTCx",
  "bucket": "dev.example.com",
  "region": "eu-west-1"
};
var options = {
  headers: {
    'Cache-Control': 'max-age=315360000, no-transform, public'
  },
  retries: 3
};
gulp.src('./dist/**')
    .pipe(s3(aws, options));

ken210 avatar Dec 09 '14 21:12 ken210

Perhaps this is more of an AWS question, but since S3 doesn't have regions (its "global") should the regions prop be included here?

cworsley4 avatar Mar 25 '15 23:03 cworsley4