This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
const Busboy = require('busboy'); | |
const getContentType = (event) => { | |
// Serverless offline is passing 'Content-Type', AWS is passing 'content-type' | |
let contentType = _.get(event, 'headers.content-type'); | |
if (!contentType) contentType = _.get(event, 'headers.Content-Type'); | |
return contentType; | |
}; |