将文件从AWS S3传输到Jira

时间:2017-09-22 09:08:09

标签: node.js amazon-web-services amazon-s3 aws-sdk jira-rest-api

如何将文件从AWS S3传输到Jira?

我使用Node.JS AWS-SDK和库'jira-client'(https://www.npmjs.com/package/jira-client) 此代码无效:

const
  s3Object = AWSS3.getObject({
    Bucket: 'thisisbucket',
    Key: 'thisiskey'
  }),
  S3Stream = s3Object.createReadStream();
  jiraClient.addAttachmentOnIssue(jiraId, S3Stream)
    .then(() => {
      console.log('Ok');
    })
    .catch(err => {
      console.error(err);
    });

0 个答案:

没有答案