Skip to content

Commit ba530e6

Browse files
authored
Merge pull request #94 from wytlytningNZ/fix/default-mime-type-option
Fix defaultMimeType option binding
2 parents 4d31f3b + 3cc068a commit ba530e6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
expires: EXPIRE_IN_2030,
2525
dotFolders: false,
2626
batchSize: 0,
27+
defaultMimeType: 'application/octet-stream',
2728
distDir: function(context) {
2829
return context.distDir;
2930
},
@@ -61,6 +62,7 @@ module.exports = {
6162
var dotFolders = this.readConfig('dotFolders');
6263
var serverSideEncryption = this.readConfig('serverSideEncryption');
6364
var batchSize = this.readConfig('batchSize');
65+
var defaultMimeType = this.readConfig('defaultMimeType');
6466

6567
var filesToUpload = distFiles.filter(minimatch.filter(filePattern, { matchBase: true, dot: dotFolders }));
6668

@@ -78,7 +80,8 @@ module.exports = {
7880
manifestPath: manifestPath,
7981
cacheControl: cacheControl,
8082
expires: expires,
81-
batchSize: batchSize
83+
batchSize: batchSize,
84+
defaultMimeType: defaultMimeType
8285
};
8386

8487
if (serverSideEncryption) {

tests/index-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ describe('s3 plugin', function() {
128128
return previous;
129129
}, []);
130130

131-
assert.equal(messages.length, 6);
131+
assert.equal(messages.length, 7);
132132
});
133133

134134
describe('required config', function() {

0 commit comments

Comments
 (0)