1 app.get("/image/:imageId", function(req, res, next) {
2 var params = { Bucket: keys.AWS_BUCKET, Key: req.params.imageId };
3 s3.getObject(params, function(err, data) {
4 if (err) {
5 return res.send({ error: err });
6 }
7 res.send(data.Body);
8 });
9 });
10