From ac4d2330cc050178706e7915c3a2fb4187285761 Mon Sep 17 00:00:00 2001 From: Danielwhyte Date: Wed, 27 Mar 2019 11:00:47 +0000 Subject: [PATCH] sets file type to text/xml, #19 --- lambda/processFile/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lambda/processFile/utils.js b/lambda/processFile/utils.js index 001a471..a522848 100644 --- a/lambda/processFile/utils.js +++ b/lambda/processFile/utils.js @@ -97,7 +97,11 @@ const decompress = function (/* String */command, /* Function */ cb) { } zipEntries.forEach(function (zipEntry) { - s3.upload({ Bucket: command.bucket, Key: object.id + '/' + zipEntry.entryName, Body: zipEntry.getData() }, function (err, data) { + let fileData = { Bucket: command.bucket, Key: object.id + '/' + zipEntry.entryName, Body: zipEntry.getData() } + + if (zipEntry.entryName === "object.xml") { fileData.ContentType = "text/xml" } + + s3.upload(fileData, function (err, data) { counter++; if (err) {