Answers for "s3 private image getobject react js"

0

s3 private image getobject react js

app.get("/image/:imageId", function(req, res, next) {
    var params = { Bucket: keys.AWS_BUCKET, Key: req.params.imageId };
    s3.getObject(params, function(err, data) {
      if (err) {
        return res.send({ error: err });
      }
      res.send(data.Body);
    });
  });
Posted by: Guest on August-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language