summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--handler.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/handler.js b/handler.js
index cf4fbad..ad6eb1d 100644
--- a/handler.js
+++ b/handler.js
@@ -7,7 +7,9 @@ const s3 = new AWS.S3();
module.exports.save = (event, context, callback) => {
console.log(event.Records[0].kinesis);
- fetch(event.image_url)
+ var url = new Buffer(event.Records[0].kinesis.data, 'base64').toString('utf8');
+ console.log(url);
+ fetch(url)
.then((response) => {
if (response.ok) {
return response;