Skip to content

bugfix & chaining for maxPartSize and concurrentParts #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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