📜  nodejs aws s3 流上传 - Javascript 代码示例

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

代码示例1
inputStream
  .pipe(uploadFromStream(s3));

function uploadFromStream(s3) {
  var pass = new stream.PassThrough();

  var params = {Bucket: BUCKET, Key: KEY, Body: pass};
  s3.upload(params, function(err, data) {
    console.log(err, data);
  });

  return pass;
}