📜  s3 private image getobject react js - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:55.688000             🧑  作者: Mango

代码示例1
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);
    });
  });