nitaigao / gulp-s3

MIT License
101 stars 82 forks source link

Adding retries option #38

Closed ken210 closed 1 year ago

ken210 commented 9 years ago

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));
cworsley4 commented 9 years ago

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