Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
    });
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #private #image #getobject #react #js
ADD COMMENT
Topic
Name
8+6 =