Skip to content
Open
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: 5 additions & 2 deletions lib/stream/helper/leos3.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ module.exports = function(ls, queue, configure, opts, onFlush) {
seconds: 10
},
archive: false,
sectionCount: 10
sectionCount: 10,
s3PutOpts: {
StorageClass: "STANDARD_IA"
}
}, opts || {});
let fileCount = 0;

Expand Down Expand Up @@ -70,7 +73,7 @@ module.exports = function(ls, queue, configure, opts, onFlush) {
}

logger.info("S3 Location:", newFile);
s3 = ls.toS3(configure.resources.LeoS3 || configure.s3, newFile);
s3 = ls.toS3(configure.resources.LeoS3 || configure.s3, newFile, opts.s3PutOpts);
e = {
event: queue,
start: null,
Expand Down
3 changes: 2 additions & 1 deletion lib/stream/leo-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ module.exports = function(configure) {
toS3GzipChunks: function(event, opts, onFlush) {
return leoS3(this, event, configure, opts, onFlush);
},
toS3: (Bucket, File) => {
toS3: (Bucket, File, opts) => {
var callback = null;
var pass = new PassThrough();
s3.upload({
...opts,
Bucket: Bucket,
Key: File,
Body: pass
Expand Down