Skip to content

Instantly share code, notes, and snippets.

View lteacher's full-sized avatar
⌨️
Typing on my keyboard...

lteacher

⌨️
Typing on my keyboard...
  • Melbourne, Australia
View GitHub Profile
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;
};