Skip to content

Commit

Permalink
sets file type to text/xml, #19
Browse files Browse the repository at this point in the history
  • Loading branch information
Danwhy committed Mar 27, 2019
1 parent 438e2e2 commit ac4d233
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lambda/processFile/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ac4d233

Please sign in to comment.