From 383c6339e3d67127cc1d473fd93d3a1a7b223cc2 Mon Sep 17 00:00:00 2001 From: Joe Enzminger Date: Wed, 24 Aug 2016 17:11:00 -0500 Subject: [PATCH 1/3] changes backslashes to forward slashes in relative path before uploading. --- lib/write-stream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/write-stream.js b/lib/write-stream.js index 8cc7dee..14257fc 100644 --- a/lib/write-stream.js +++ b/lib/write-stream.js @@ -95,7 +95,7 @@ module.exports = function createWriteStream(root, options) { } var fileOptions = _.assign({ }, awsOptions, { - Key: prefix + file.relative, + Key: prefix + file.relative.replace(/\\/g,'/'), ContentType: contentType, ContentEncoding: contentEncoding.join(',') }, file.awsOptions); From cfa47b6fa6943b921f3155e459425d61f8d7f839 Mon Sep 17 00:00:00 2001 From: Joe Enzminger Date: Thu, 25 Aug 2016 10:04:39 -0500 Subject: [PATCH 2/3] fixes lint errors --- lib/write-stream.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/write-stream.js b/lib/write-stream.js index 14257fc..fe9bed6 100644 --- a/lib/write-stream.js +++ b/lib/write-stream.js @@ -94,10 +94,10 @@ module.exports = function createWriteStream(root, options) { contentType = mime.lookup(name); } - var fileOptions = _.assign({ }, awsOptions, { - Key: prefix + file.relative.replace(/\\/g,'/'), - ContentType: contentType, - ContentEncoding: contentEncoding.join(',') + var fileOptions = _.assign({}, awsOptions, { + Key: prefix + file.relative.replace(/\\/g, '/'), + ContentType: contentType, + ContentEncoding: contentEncoding.join(',') }, file.awsOptions); if (!file.isNull()) { From 5868b9b14fdb75bb9ced58a6efc85869249821d9 Mon Sep 17 00:00:00 2001 From: Joe Enzminger Date: Thu, 25 Aug 2016 10:11:11 -0500 Subject: [PATCH 3/3] changes spaces to tabs for lint errors --- lib/write-stream.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/write-stream.js b/lib/write-stream.js index fe9bed6..68f6e54 100644 --- a/lib/write-stream.js +++ b/lib/write-stream.js @@ -95,9 +95,9 @@ module.exports = function createWriteStream(root, options) { } var fileOptions = _.assign({}, awsOptions, { - Key: prefix + file.relative.replace(/\\/g, '/'), - ContentType: contentType, - ContentEncoding: contentEncoding.join(',') + Key: prefix + file.relative.replace(/\\/g, '/'), + ContentType: contentType, + ContentEncoding: contentEncoding.join(',') }, file.awsOptions); if (!file.isNull()) {