Skip to content

Commit

Permalink
Merge pull request #9 from rmp/master
Browse files Browse the repository at this point in the history
Bugfix & chaining for maxPartSize and concurrentParts
  • Loading branch information
nathanpeck committed Aug 15, 2014
2 parents 221d7e6 + e557da2 commit c019792
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,13 @@ var UploadStreamObject = new Uploader(
},
function (err, uploadStream)
{
uploadStream.maxPartSize(20971520) //20 MB

uploadStream.on('uploaded', function (data) {
console.log('done');
});

read.pipe(uploadStream);
}
);
).maxPartSize(20971520) //20 MB
```

### stream.concurrentParts(numberOfParts)
Expand All @@ -161,15 +159,14 @@ var UploadStreamObject = new Uploader(
},
function (err, uploadStream)
{
uploadStream.concurrentParts(5)

uploadStream.on('uploaded', function (data) {
console.log('done');
});

read.pipe(uploadStream);
}
);
).concurrentParts(5);
```

### Tuning configuration of the AWS SDK
Expand Down
2 changes: 2 additions & 0 deletions lib/s3-upload-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module.exports = {
partSize = 5242880;

self.partSizeThreshold = partSize;
return self;
};

// Set the maximum amount of data that we will keep in memory before flushing it to S3 as a part
Expand All @@ -81,6 +82,7 @@ module.exports = {
parts = 1;

self.concurrentPartThreshold = parts;
return self;
};

// Handler to receive data and upload it to S3.
Expand Down

0 comments on commit c019792

Please sign in to comment.