diff --git a/src/handler.js b/src/handler.js index 9ef4572..cf5008c 100644 --- a/src/handler.js +++ b/src/handler.js @@ -104,9 +104,11 @@ module.exports = function(options) { .then((buffer) => { return upload(options.bucket, destKey, buffer, mimeType); }) .then(() => { fulfill({ - statusCode: 301, + isBase64Encoded: true, + statusCode: 200, + body: resizedBuffer.toString('base64'), headers: { - "Location": options.cdnUrl + '/' + destKey + 'Content-Type': mimeType } }) })