Skip to main content
Participant
March 30, 2023
Question

transientDocument Id generating API does not work when filestream is passed from S3

  • March 30, 2023
  • 3 replies
  • 731 views

If I create a readFileStream from local directory then I am able to upload template and get transient Id but If done the same by fetching the uploaded docx file in S3 it doesn't work. I am getting the file Stream using the below code and it doesn't work.

 

async function getFileStream() {
  // configuring the AWS environment
  AWS.config.update({
    accessKeyId: process.env.AWS_ACCESS_KEY,
    secretAccessKey: process.env.AWS_SECRET_KEY,
  });
  // initialize s3
  const s3 = new AWS.S3();
  const file = s3.getObject({ Bucket: 'bucket', Key: 'key.docx' }).createReadStream();
  const pass = new stream.PassThrough();

  stream.pipeline(
    file,
    pass,
    (err) => {
      if (err) {
        console.error(err);
      }
    },
  );
  return file;
}

 

 
But when I implemented it directly like below then it works perfectly.

const file = fs.createReadStream(file.path);
return file;

There is no error in the above case but the response never comes until 120 seconds and then it throws timeout error.

This topic has been closed for replies.

3 replies

atsmusz_as_dsEng
Adobe Employee
Adobe Employee
April 19, 2023

Hello,

 

We don't support transient upload from S3.  We do allow creating an agreement from a direct link to a file on a URL but that would skip the transient upload step.  


Aaron Smusz - Data Science Engineering - Adobe Acrobat Sign
Participant
April 16, 2023

Peace, mercy and blessings of God be upon you. This wonderful topic is very goodهدا موضوع رائع جدا مفيد جدا أن يكون شرف لي

 

Kozik 1975
Meenakshi Negi
Community Manager
Community Manager
March 31, 2023

Hi Ankush29091839sn75,

 

Thank you for reaching out.

 

We have checked that you are using the Acrobat Sign Developer service.

As you have a question related to API integration, the experts can best answer it.

Moving this thread to the Acrobat Sign Developer board for visibility.

 

You may also contact the pre-sales team. They will be able to provide you the pre-sales technical assistance and share the correct information.

Please refer to the following link to contact them: https://acrobat.adobe.com/us/en/sign/pricing/plans.html. You may use the Contact us button for Adobe Sign Solutions under the team tab.

 

Thanks,

Meenakshi